Commit Graph

1205 Commits

Author SHA1 Message Date
Thomas Lamprecht
6f830d1d24 followup trailing whitespace fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-11 16:12:33 +01:00
Alexandre Derumier
2d1e9a02c3 INotify: network : add ovs_mtu option
This is also rewriting any "mtu" option on a ovs interface
to "ovs_mtu"

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-11 16:11:04 +01:00
Alexandre Derumier
b94d05ecc6 INotify: add bond-primary option
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-11 16:11:04 +01:00
Alexandre Derumier
c8ff0bdf3d INotify: allow vlan tagged bridge interface on non-vlanaware bridge
Seem that it's working too with non-vlanaware bridge

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-11 16:11:04 +01:00
Alexandre Derumier
f5d8be06b6 Inotify: forbid ip address on bridged interface.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-11 16:11:04 +01:00
Alexandre Derumier
c86cfb8bbd INotify: remove allow-hotplug from /etc/network/interfaces
for user installing proxmox on top of debian,
debian install by default the first nic with allow-hotplug.

This is conflicting with "auto ...", but worst with ovs "allow-ovs ...".

User have reported race with ovs, where ovs vmbr was up before the nic.
https://forum.proxmox.com/threads/no-network-on-server-unless-i-ifdown-ifup-vmbr0.62733/

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-08 10:32:36 +01:00
Thomas Lamprecht
12349ad05f REST Handler: check for value defindness when untainting
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-08 10:32:12 +01:00
Thomas Lamprecht
f27d5e6b7a sort module usage + some newlines for readabilty
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-08 10:31:39 +01:00
Thomas Lamprecht
1f929ade0a grammar fix: s/does not exists/does not exist/g
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-13 12:05:54 +01:00
Thomas Lamprecht
0da8dc9d77 README.dev: drop apt-transport-https
since apt 1.5 this is not required anymore

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-04 10:19:16 +01:00
Thomas Lamprecht
f060024441 bump version to 6.0-9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-23 16:15:14 +01:00
Thomas Lamprecht
2f98cd72a8 ProcFSTools: add kernel_version
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-23 12:15:59 +01:00
Thomas Lamprecht
510f865b5c tests: allow to make tests in parallel
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-23 12:14:19 +01:00
Thomas Lamprecht
69e15ccb47 be a bit more specific about not using this big list
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-23 10:30:22 +01:00
Thomas Lamprecht
77624d0219 remove corosync-dev from build deps
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-23 10:20:29 +01:00
Thomas Lamprecht
e2f2c2d026 CLIHandler: record missing JSONSchema usage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-22 19:30:38 +01:00
Thomas Lamprecht
450d7efcd1 bump version to 6.0-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-20 18:43:15 +01:00
Dominik Csapak
882eaf6ad4 SysFSTools: do not assume pci domain 0000
but prepend '0000' to ids where no domain is given, to keep the ability
to use the shorthand syntax (e.g. 00:01.0 instead of 0000:00:01.0)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-19 15:54:13 +01:00
Wolfgang Bumiller
0dd5686aef avoid cyclic reference in closure
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-19 09:49:10 +01:00
Thomas Lamprecht
848231afd2 section config: remove Data::Dumper usage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-18 15:39:02 +01:00
Thomas Lamprecht
8bc99fda82 followup: avoid very long line through comment moval
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-12 14:16:01 +01:00
Dominik Csapak
c1d62a9d54 fix Tools::df for big storage usage values
if the size/avail of a mount is bigger than a certain amount,
json_encode writes the number in scientific format, which was not
matched by our \d+ regex.

This then resulted in 'undef' values for the result hash and
subsequently led to errors and warnings.

Extend the regex to also match scientific formatted numbers,
perl can then use them as is, no need for any conversion.

https://forum.proxmox.com/threads/bug-in-pve-tools-df-when-adding-petabyte-scale-storage.60090/#post-277050

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-12 14:12:02 +01:00
Wolfgang Bumiller
76c5fee814 Tools: add new mount api wrappers
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-11 17:09:56 +01:00
Wolfgang Bumiller
88c2babd16 add missing 1; at the end of Syscall.pm
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-11 17:09:56 +01:00
Wolfgang Bumiller
5569cc1634 PVE::Syscall: add new mount api constants
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-11 17:09:56 +01:00
Wolfgang Bumiller
1b0bc6c0ab tools: add AT_FDCWD and extend exports
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-11 17:09:56 +01:00
Wolfgang Bumiller
34fe939242 ProcFSTools: include ppid in read_proc_pid_stat
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-11 17:09:56 +01:00
Thomas Lamprecht
9862aca278 bump version to 6.0-7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-08 12:48:36 +01:00
Fabian Grünbichler
4e91db0ae8 cert: add fingerprint helper
for usage in pve-cluster's certificate cache.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-08 12:47:42 +01:00
Thomas Lamprecht
b15e50dda1 network: cleanup get_local_ip_from_cidr
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-08 12:47:16 +01:00
Dominik Csapak
484b6b398b JSONSchema: add pve-tag format
this will be used for vm/ct tag-lists, so that (config) management systems
or similar add additional information that does not reside in the
description

putting it here, since we want to eventually have it also for
nodes,storages,etc.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-10-30 08:43:43 +01:00
Thomas Lamprecht
e1d864ebdf bump version to 6.0-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 08:07:34 +01:00
Thomas Lamprecht
9b0220b55d d/control: record breaks of pve-container (<< 3.0-9)
As we drop the arch translation part used by pve-container packages
in version 3.0-8 or older we need to break them, to avoid broken
newly created containers.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 07:29:02 +01:00
Thomas Lamprecht
b8faece385 followup: drop get_host_arch prototype
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 07:16:38 +01:00
Stefan Reiter
ce007e99ff tools: get_host_arch: return raw uname machine entry
The current version had only one user in LXC, so move the LXC-specific
code there to reuse this in QemuServer.

Also cache, since the host's architecture can't change during runtime.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-10-29 07:13:54 +01:00
Wolfgang Bumiller
a79f03d9a6 OTP: support v2 secret format
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-10-29 06:27:39 +01:00
Wolfgang Bumiller
6e2343254e JSONSchema: add TFA-secret format; support longer secrets
The old format used 16 base32 chars or 40 hex digits. Since they have
a common subset it's hard to distinguish them without the our
previous length constraints, so prefix a 'v2-' of the format to
support arbitrary lengths properly.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-29 06:26:55 +01:00
Thomas Lamprecht
4074d3722c bump version to 6.0-5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-20 16:39:38 +02:00
Alexandre Derumier
f48815f8b6 etc_network_interfaces : handle autostart for ovs
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-20 16:39:38 +02:00
Thomas Lamprecht
bd9cc42d82 network: followup code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-20 09:43:29 +02:00
Alexandre Derumier
4ac94c72a2 network_interfaces: use allow-ovs for OVSBridge
new openvswitch-switch service use "ifup --allow-ovs",
and this race with "auto ..." used by networking service

bug reported here:
https://forum.proxmox.com/threads/so-is-openvswitch-bonding-just-broken-on-pve-6-whats-going-on.58020/

This is also fixing ovs with ifupdown2

Openvswitch github have a note about this:
e0dfd67b45 (diff-555e6da95251766b76e83867900bd8fe)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-20 09:06:47 +02:00
Thomas Lamprecht
9bbc4e174c tree wide trailing whitespace cleanup
generated with:
 # find . -name '*.pm' -exec sed -i 's/\s\+$//' {} \;

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-09 16:42:12 +02:00
Alexandre Derumier
d949babe56 etc_network_interfaces : add uplink-id option
uplink-id is an integer

it's used to abstract the interface name (could be different on
differents hosts)
and map it to a transportzone.

uplink-id is only allowed on physical interfaces (bond,eth,vlan)
as it's used for traffic to external

example:

auto eth0
iface eth0 inet manual
        uplink-id 1

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-09 16:41:12 +02:00
Thomas Lamprecht
c5c5812e23 add postinst hook to fix /etc/aliases whitespace error
This was wrongly shipped by our ISO since quite a bit (AFAICT, at
least 4.x), so fix it up in a versioned postinst snippet.

Do so by usind sed with the following pattern:
 # sed -E -i -e 's/^www:(\w)/www: \1/' /etc/aliases
proposed by Musee Ullah[0]. It even catches a bit more than exactly
our misstep, may help if one copied this line, or added some other
addresses to this specific aliases entry.

Do this here, in pve-common, as it makes it sligthly simpler to roll
the change out to both, PVE and PMG.

[0]: https://pve.proxmox.com/pipermail/pve-user/2019-September/170998.html

Reported-by: Uwe Sauter <uwe.sauter.de@gmail.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-05 12:35:55 +02:00
Fabian Ebner
9e594bd42e SectionConfig: Cleanup to make style consistent
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-09-04 16:18:19 +02:00
Fabian Ebner
e1fbb779f7 Fix 2339: Handle multiple blank lines correctly in SectionConfig
It turns out that the line number counting was also broken (even on
files without multiple blanks), since the body of the while inside
the nextline subroutine would not be executed for a blank.
I guess the subroutine was intended to skip comments and blanks, but
since we use blanks to recognize the end of a section, I changed it
to only skip comments.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2019-09-04 16:17:55 +02:00
Wolfgang Bumiller
9e3aaec494 cli: prettify tables even more
Separate the header with a double line.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-04 15:58:58 +02:00
Thomas Lamprecht
454882c392 bump version to 6.0-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-08-17 11:31:53 +02:00
Fabian Grünbichler
6cf6b40469 tools: add fchownat syscall
and constant AT_EMPTY_PATH for chowning a directory/file opened via
openat(2), for example when walking/creating a directory tree without
following symlinks.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-08-14 15:33:19 +02:00
Stoiko Ivanov
6bd0783c11 CLIHandler: consider valid prefixes for completion
With the change introduced in 57c0d0c69c
completion of partial commands stopped working (e.g. typing qm res<TAB><TAB>
yields nothing instead of 'reset resize resume rescan')

By returning undef as 'ref' 'print_bash_completion' has no reference of the
available (sub) commands anymore.

By checking if the current argument is a valid prefix of a possible command,
and conditionally not setting the 'ref' hash to undef, the functionality is
restored.

Additionally a small whitespace glitch was fixed.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-08-14 11:13:06 +02:00