IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Reduce by a few lines in general and move out checking the address to
avoid to much (repeated) inline noise..
no semantic change intended.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
- Two-argument "open" used at line 462, column 3. See page 207 of
PBP. (Severity: 5)
- Subroutine "new" called using indirect syntax at line 487, column
15. See page 349 of PBP. (Severity: 5)
- Bareword file handle opened at line 1533, column 5. See pages 202,
204 of PBP. (Severity: 5)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
commit c86cfb8bbd dropped allow-hotplug
from the primary interfaces file completely on write, but that breaks
setups that come from plain Debian.
Instead, as stop-gap measurement, transform "allow-hotplug" to auto
in the PVE controlled config.
That avoids conflict and improves installing PVE on top of plain
Debian, as the interface still comes up after the first reboot.
But it is not ideal auto is not the same as hotplug, so we need to
also track that difference in the future, but that needs some
adaptions in the API too (change autostart from boolean to
string+enum or so=
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
With the merger the shop got moved from shop.maurer-it to
shop.proxmox.com, while we transparently redirect we also want to
stop doing that in a few years, so use new domain.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Sometimes we need to have a fallback for gai (get_ip_from_hostname)
but cannot yet rely on configured networks (get_reachable_networks)
from kernel POV (those may not have been configured yet, e.g., on
boot), so the ones configured in /etc/network/interfaces would be
nice too then, as they're the ones that will get configured soon
anyway on boot.
Add a new helper that takes in all those sources and allows to return
a single (first found) or all of those addresses.
Still prioritize the address we get from getaddrinfo, as there the
admin has control through /etc/hosts, DNS and gai.conf and treat the
remaining ones as fallback.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
will be used for the issue banner generators and for some "get
nodeip" calls as fallback for get_ip_from_hostname, which tends to
fail in our CT envs (e.g., PMG)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Return a suitable address directly instead of breaking out of the
loop to do that.
no semantic change intended
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
those fields might be interesting to users. At the moment, this is
only used in the external metrics export.
These fields exist in the kernel since:
* irq - 2.6.0
* softirq - 2.6.0
* steal - 2.6.11
* guest - 2.6.24
* guest_nice - 2.6.33
so they must all exist
also add a 'total' field which simply sums up the (non-guest) fields
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
As that would be weird, the use explicitly did not configure it,
which is OK, and we'd then warn due to *our* fallback to `0`.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
it's an invalid combination that causes the network reload/setup to
fail. unfortunately, this is not caught by ifupdown2 itself, but only
rejected by the kernel with ERANGE over netlink.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Used in qemu-server for avoiding KillMode 'none'. SendSIGKILL is a
boolean, so we need to use dbus_boolean to serialize it.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
so it is more consistend with the source (it comes from the file
'device') as well as the subsytem_device field
the only place we use that field is in the same file in pci_dev_bind_to_vfio,
which we also change here, so that should not be a breaking change
(in qemu-server we only really use the existance and the has_fl_reset
flag)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
to also get the subsystem_vendor and device, as well as the
iommu group and mediated device support
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
There's also support for ending a task with warnings now, so the logic "status
not 'OK' means error" does not work anymore.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Net::IP doesn't seem to have a function for it and normalizing to the full
quad-form is less then ideal if we inted to output IPv6 addresses returned by
that function at some point.
Instead, use NetAddr::IP, which is already used in pve-network.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
is_ip_in_cidr('fd80:1::10', '127.0.0.1/24') would result in
Use of uninitialized value in numeric eq (==)
as overlaps() returns undef in such a case.
Note that there are (albeit few) existing callers that don't specify $version.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
it is not necessary to include this block in the eval which when it
fails tries to unlink $tmpdest, because in the check for the existing
file $tmpdest is not used.
We support also vlanX, with X being a integer for the VLAN id, as
valid vlan iface name, so support that too here.
and make the dev name check for definedness, even if "0" is currently
not really supported (officially) it is still a valid iface name for
the kernel (which takes any byte).
The VLAN id is in the range of [2, 4094] (inclusive) so defined check
is not required there.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Setting the vlan-id and vlan-raw-device value for vlan devices that
follow the dot notaton (interface.vlan) aligns how dot notation vlan
devices and vlan devices that use the explicit vlan-id and
vlan-raw-device options, available with ifupdown2, are represented in
API return values.
Previously the type for both was 'vlan' but only the latter showed more
details.
Setting these values here should not have any influence on how the
interfaces file is being written as these two values are already
filtered in __write_etc_network_interfaces for dot notation devices.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>