In most cases we use config locking, the lock is acquired only once, in which case all works as expected.
When a controller fetches a lock and passes it on to one of the core controller wrappers which then re-acquires the same lock, the default is to load the config again.
Pending data in other models will be flushed in these cases, which is unexpected if we're updating the same config, but a different section.
This change only executes the reload when not yet locked by this process.
This makes it easier for special model field types to translate values into human readable formats, also when not being presented to the user like that in a selector.
minor modification in reconfigure_gifs.php to prevent ipv6 addresses to be left behind after a change.
When the interface already exists, flush all addresses in the same way Wireguard is doing on our end and link virtual ips and routes back after configuration.
For IPv4 this seems to be less problematic as additional addresses are aliases and changing the address leads to an update instead of an "insert".
gettext 0.22.5 broke legacy translation but MVC kept working so
digging through the code this is the additional env vars and
setting that Phalcon does.
cleanup _interfaces_gif_configure() a bit and mark the sections that should be removed in 24.7, the idea is to make sure routing is consistent between all interface types, which means the routing parts should go away. Existing configurations should stay functional, only when adding an aliasip no interface would be connected (which after final cleanup would be the default behavior anyway).
Ditch legacy pages and change menu registrations and acl's. This state should be safe for a minor release, so we can push the behavioral change in 24.7 by only removing the marked sections.
First batch of changes for this migration, the data underneath should be left mostly unchanged. The model overlays the existing data, only new entries will be slightly different.
When an interface is offered, it will be stored in the <if> field, an address will be moved to the <ipaddr> field, one of these values will be used instead of both for ipalias entries.
The reconfigure action is similar to the one in laggs, and will only apply the records changed by the user. Dropping gif interfaces before creation shouldn't be needed, so that's removed as well.
Using the LinkAddressField type we can either offer an (existing) address or an interface/carp vhid, to keep things backwards compatible. With the replaceInputWithSelector() javascript helper we can offer the choice between an address or a known entity from the list.
Often many related sysctls are queried in sequence, but since the
binary allows for multiple params we can save the overhead and
simply push the result in a parseable structure. Include the original
OID so the caller can deal with missing sysctls or empty values.
Using this commit you can fetch the options from a different source and replace <input> tags for a combination of <input>/<select>, example usage:
ajaxGet('/api/my/endpoint', [], function(data, status){
$(".net_selector").replaceInputWithSelector(data);
});
When a migration tries to address an non existing attribute, a InvalidArgumentException is thrown, but only partially noted in the log.
It's likely safer to abort the migration if steps fail and send the error to the log for further inspection.
Turns out there is still implicit buffering happening, the exception
thrown is due to a lack of error handling on the Phalcon side. Even
the PHP docs suggest silencing this with '@'.
This reverts commit 7c05e524b047e6d915b80994855a4e69d365645c.
Our default PHP configuration already has output buffering set to 0,
and since there is no explicit buffering start, the ob_end_flush()
will throw two exceptions on development mode when streaming a log
file. We likely don't need this anymore so removing it here.