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>
seems like LDAP->new doesn't adds it, so we get the ". at
/path/to/module.pm line xy" ugly error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
as we now register the ldap-simple-attr' format, and double
registrations result in exceptions.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
While seldom some of our API endpoints do not define it, e.g., the
world readable /access/ticket call.
As all of the stack can cope with that just fine make getopt_usage
also follow that behavior and don't assume that properties has to be
defined.
This fixes a complaint about undefined value use in the following
calls:
pvesh usage /access/ticket
pmgsh help /access
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
With revert "network: followup: move graceful require SDN out from
subs" squashed.
This reverts commit c02d6d1c96.
This reverts commit 35f2791ffa.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>