/usr/share/zoneinfo/zone.tab has the valid list of time zones.
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
bridge-ports is an optional parameter but was assumed to be defined in
the code. This resulted in 'use of uninitialized value' warnings.
By reordering of the $ports definition before the replace, we get rid of
the 'use of uninitialized value' when no bridge-port is specified.
In the second case we set it to an empty string when it is undefined.
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
Currently, bond slaves are mostly working without autostart,
because bond slaves scripts from ifupdown1 && also ifupdown2
have some kind of hacks to start the slaves.
But if users want to do some tuning on the ifaces, they are not applied.
Also, with ifupdown2 + ovs, this kind of hack is not implemented (yet), so the
slaves of the bond are still down.
Debian/Ubuntu official docs always set "auto ethX" for bond slaves,
it's really more clean like this.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This is useful for when collecting data for Guest OS licensing (Microsoft)
where physical core count matters, not socket or thread count.
The "cpus" value counts threads when Hyperthreading is enabled.
Signed-off-by: Mike Beattie <mike@ethernal.org>
Currently, when a trunks is defined, the vlan tag is not used
for pvid with vlan-aware bridge. (It's ok with ovs switch)
example:
net0: e1000=BA:90:68:B8:CF:F5,bridge=vmbr1,tag=2,trunks=2-11
before
------
tap100i0 2-11
after
-----
tap100i0 2 PVID Egress Untagged
3-11
No regression for other configurations:
net0: e1000=BA:90:68:B8:CF:F5,bridge=vmbr1
before
------
tap100i0 1 PVID Egress Untagged
2-4094
after
-----
tap100i0 1 PVID Egress Untagged
2-4094
net0: e1000=BA:90:68:B8:CF:F5,bridge=vmbr1,tag=2
before
------
tap100i0 2 PVID Egress Untagged
after
-----
tap100i0 2 PVID Egress Untagged
net0: e1000=BA:90:68:B8:CF:F5,bridge=vmbr1,trunks=2-11
before
------
tap100i0 1 PVID Egress Untagged
2-11
after
-----
tap100i0 1 PVID Egress Untagged
2-11
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
fixes commit 89ea13ef6b and
restores old behavior, the "if !$trunks" post-if was a bit suble, it
did not guard the die, but the system command previously - the die
was || (ORd) to the command, bad code style to begin with..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
on kernel configs where KSM is not enabled (e.g. an openstack instance at
OVH) the file /sys/kernel/mm/ksm/pages_sharing does not exist.
In that case there is no memory shared so assuming 0 is reasonable.
While this is not the case with our shipped kernel, and thus will probably
not happen on a PVE installation, PMG can run quite happily with a different
kernel (the reporter had this on an openstack instance at OVH).
a quick grep through our codebase showed only the API2::Nodes::Nodeinfo::status
call as user of the memshared property.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
by introducing a safe_compare helper. Fixes warnings, e.g.
pvesh get /nodes/<NODE>/network
would print "use of uninitialized"-warnings if there are inactive
network interfaces, because for those, 'active' is undef.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Tested-by: Oguz Bektas <o.bektas@proxmox.com>
we use this format for all 'delete' options but we have some options
that have a '-' in the name (e.g. 'sync-defaults-options') that cannot
be deleted if it is not included
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
By using "exists" when checking if a hash entry is set, else things
like "0" could get accepted by mistake.
Also cleanup the code a little, like dropping the "PVE::JSONSchema::"
prefix, this is now in that module after all.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
generalized from the start to support extension to bridges or other
entities as well.
this gets us incremental support for the CLI, e.g.:
--targetstorage foo:bar --targetstorage bar:baz --targetstorage foo
creates a mapping of
foo=>bar
bar=>baz
with a default of foo
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This is explicitly allowed in the documentation and happens
easily with cgroupv2 as there it is used to inherit from the
closest ancestor.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
All of our users of this function currently either pass
'effective_cpus' or nothing (undef), and in cgroupv2 the
effective-cpuset file uses a different naming scheme.
Since this is only a distinction between "intended" and
"effective", use this as a boolean instead, for easier
future cgroupv2 support.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This should bring back compatibillity in the read site and one for
all clears that cidr is cidr, netmask is mask and address is address
(outgoing).
We're still very flexible on what can be written out.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
write changes some parts of the config, if this is a reference to the
config used for checking parsing it may lead to unexpected failures
due to those side effects..
For me it was "cidr" and "cidr6" getting deleted, and thus upcomming
tests for a compat change failing without any apparent reason.. :/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
fixes commit 78c6656c9aba1d57786f916717c2622a3059fb6 which dropped
writing out the netmask but missed to add compat code for the case
where the caller did not suplly a address in CIDR format already.
Check if an address ends with /\d+, if not see if a netmask is
available and add that similar how it gets handled on read.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>