We shouldn't mix different tool sets on the one hand, and on
the other hand net-tools is an optional package in stretch
and there's no real need for us to depend on it.
When a container stops or hotplug changes are applied we
do a veth_delete() which does not cleanup the firewall
bridges or OVS ports. This is problematic at the next
startup. When creating a network device we usually want to
copy the MTU of the bridge we intend to put it on, however,
with OVS still having the old port lying around the
recreated device gets associated with the bridge before we
read its MTU, potentially reducing it to that of the newly
created device.
This cleanup also gets rid of stale fwbr/fwln devices from
stopped containers.
This introduces a cyclic dependency, so we need to remove this.
PVE::CLI::* classes should instead add ad call to
PVE::RPCEnvironment->setup_default_cli_env();
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
unless we are in cleanup mode from a failed snapshot_create,
in which case the config already has a 'snapshot' lock.
this is necessary to prevent concurrent starting of or other
actions on the guest in the windows inbetween holding the
flock, e.g. when removing the volume snapshot (which can
take a bit of time).
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
while the input should be correctly generated by the other site its
still better to be on the safe side, so check if the IP is really an
valid one.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Ask the pvecm mtunnel command (was earlier in qm) if the remote side
has an IP configured in a given migration_network denoted by a CIDR.
If such a IP is available reset the nodeip and rem_ssh variables
and check if we can connect to the other side with ssh public key
authentication.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
While our code currently passes the format hashes directly,
some code gets them via the format property of a
configuration description which verifies successfully via
check_format() for named property string formats, so this
should be allowed.