Commit Graph

1081 Commits

Author SHA1 Message Date
Alexandre Derumier
bc6713dfff INotify: detect ifupdown2 from executable not path
Seem than addons.conf file is not removed on "apt remove ifupdown2",
so /usr/share/ifupdown2 is not removed too.
2020-03-07 16:57:33 +01:00
Alexandre Derumier
d34d739328 INotify: use auto for ovs interfaces with ifupdown2
Need the ifupdown2 openvswitch addon !
2020-03-07 16:57:33 +01:00
Thomas Lamprecht
d31273b42f bump version to 6.0-13
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-04 15:44:18 +01:00
Dominik Csapak
261ea3cad6 add LDAP Wrapper code
This will be used for PMG and PVE LDAP Authentication & Sync.
The code is largely copied/inspired by the already existing LDAP code in
PVEs AccessControl and PMGs LDAPCache

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-03-04 15:33:50 +01:00
Dominik Csapak
30aeac2ef2 fix #2618: increase maximum port for spice to 61999
and expose the range in its own sub to reuse it in http-server

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-03-04 15:30:37 +01:00
Thomas Lamprecht
202eaa4776 followup cleanup and fix missing semicolon
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-04 15:12:59 +01:00
Alexandre Derumier
beedabb4ab remove extra space after address && gateway options
only 1 space like all others options

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-03-04 14:59:34 +01:00
Alexandre Derumier
378c6656c9 INotify: use cidr for address on config change
netmask/broadcast options are deprecated since buster
https://manpages.debian.org/buster/ifupdown/interfaces.5.en.html

This still read both "old address/netmask" or "address cidr" format,
but always convert it to cidr address format

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-03-04 14:59:34 +01:00
Thomas Lamprecht
5bd1e56b7a get_ip_from_hostname: check all address we get from getaddrinfo_all for non-local IP
This was limited without reason to checking only the first IP we get
returned from getaddrinfo_all, but we can have multiple IPs for a
hostname, and possible one of them is local but another not, so check
all and only die if no non-local address at all got found.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-21 13:54:16 +01:00
Christian Ebner
630fe0a735 zsh-completion: Add missing flag to compadd
This fixes an issue with zsh completion where certain words were not added to the
list of matches, but incorrectly interpreted as flags or options.

By passing the "--" flag, compadd is notified that all following arguments should
be considered for completion and not interpreted as flags or options for compadd.

Details can be found in the compadd documentation:
http://zsh.sourceforge.net/Doc/Release/Completion-Widgets.html#Completion-Builtin-Commands

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2020-02-21 09:45:14 +01:00
Alexandre Derumier
a70e9925ae INotify : check_bridge : fix bridge-ports with vlan tagged interface
Currently with strip vlan tag, that's wrong because
mtu && others check are done the main interface.
2020-02-07 12:56:24 +01:00
Alexandre Derumier
dd3004e266 INotify: check bridge ip: add missing check if method is not defined 2020-02-07 12:56:24 +01:00
Alexandre Derumier
968c90f174 INotify: fix mtu check && add test
reverse the parent-child. (bridge-port is the parent)
2020-02-07 12:56:24 +01:00
Thomas Lamprecht
7c67d20d92 bump version to 6.0-12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-31 13:45:56 +01:00
Thomas Lamprecht
b4f88e889f systemd: add un-/escape_unit helpers
moved from pve-storage, we need to reuse it in another module there,
as it's a general method lets just move it here already.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-31 13:45:56 +01:00
Thomas Lamprecht
1446e6a896 procfs: add check_kernel_release
adapted from Wolfgan's patch[0] for a pve-container feature check, as
this is a general check let's move it here.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2020-January/041477.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-31 13:45:56 +01:00
Thomas Lamprecht
5bd218329e bump version to 6.0-11
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-28 11:33:29 +01:00
Fabian Grünbichler
4c72ade059 API schema: add 'allowtoken' property
to mark which API methods should be available to clients authenticated using an API token.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-27 18:39:26 +01:00
Alexandre Derumier
f82c73738d tests: unknown interfaces order: rename vlan interfaces to unknown
vlan(X) interfaces are not unknown anymore
use generic name instead

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-25 16:01:34 +01:00
Alexandre Derumier
bbe7d3edf3 INotify: improve vlan interface parsing
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-25 16:01:34 +01:00
Moayad
c3733145eb Add build dependency libtest-mockmodule-perl
Signed-off-by: Moayad Almalat <m.almalat@proxmox.com>
2020-01-20 16:02:37 +01:00
Thomas Lamprecht
83ef072e57 ACME: comment fixup some POST to GET-as-POST
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-15 14:28:51 +01:00
Wolfgang Link
b9ca506c37 ACME: Change authorization call
As Let's Encrypt will no more allow GET calls[0], we have to change
to GET-as-POST[1] requests.

[0]: https://community.letsencrypt.org/t/acme-v2-scheduled-deprecation-of-unauthenticated-resource-gets/74380/4
[1]: https://tools.ietf.org/html/rfc8555#section-6.3

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
[ Thomas: Add ACME tag and reference GET-as-POST[1] ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-15 13:54:02 +01:00
Thomas Lamprecht
629dc37548 bump version to 6.0-10
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-13 17:52:07 +01:00
Thomas Lamprecht
0e4d81adb8 certs: generate_csr: allow to set CN explicit
Else, when used with ACME, the SAN is always sorted so we always get
the Subject Alternative Name sorting alphabetically first, which
doesn't necessarily has to be the "primary" domain. While this is
rather cosmetically (all SANs are equal) it could still result it
flapping CN when SANs and thus possibly the order changes, e.g., in
our CDN mirror pool. It also doesn't costs anything to allow control
over this, so why not..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-13 17:38:08 +01:00
Thomas Lamprecht
055f076be5 followup code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-11 16:15:02 +01:00
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