Commit Graph

705 Commits

Author SHA1 Message Date
Dominik Csapak
a0ef509a66 ceph: do not check ips if no network is configured
the network and the cluster network are optional in the ceph config
and with 'pveceph init', so only check if we have an ip address
from those networks if it is actually configured

otherwise, the createosd call dies with an 'ip' error message
even if it would work

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-03-04 15:38:09 +01:00
Dominic Jäger
6e7f4ca63f ceph api: Make systemd unit type suffix optional
To (re)start and stop Ceph services the API calls systemd units using the
function ceph_service_cmd.  If unspecified, this function assumes the type
".target" for a unit. By making the unit type suffix in the API optional, it
can make use of this assumption.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2020-02-17 13:08:21 +01:00
Fabian Grünbichler
a901f94a2c api/tasks: attribute token tasks to user
and store token ID in separate, currently unused member.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-29 10:28:16 +01:00
Alexandre Derumier
9d2e1c8b6e API2: Network: add vlan-raw-device && vlan-id options.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-25 16:02:06 +01:00
Thomas Lamprecht
a6ed0aa605 network reload: check if recent enough PVE ifupdown2 version is present
We need a recent version *and* our patches on top of the vanilla
ifupdown2:
0001-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch
0004-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch

So check for at least 1.2.8 and the pve string in the version output.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-14 11:00:26 +01:00
Alexandre Derumier
94011309e2 api2 : network : add mtu
min 1280 to handle ipv6 && ipv4
max 65520 (infinibad support it)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-11 17:22:46 +01:00
Alexandre Derumier
7942a7bb5b api2: network: add bond-primary option
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-11 17:22:46 +01:00
Thomas Lamprecht
a05349ab35 followup: add a bit of context to error message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-16 15:38:50 +01:00
Aaron Lauterer
05bd76ac0e API: OSD: Fix #2496 Check OSD Network
It's possible to have a situation where the cluster network (used for
inter-OSD traffic) is not configured on a node. The OSD can still be
created but can't communicate.

This check will abort the creation if there is no IP within the subnet
of the cluster network present on the node. If there is no dedicated
cluster network the public network is used as a failsafe even though
this situation should not occur.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-12-16 15:12:18 +01:00
Thomas Lamprecht
a7f047588e grammar fix: s/does not exists/does not exist/g
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-13 12:09:44 +01:00
Thomas Lamprecht
06855f1264 followup: IP in capital & what the node IP is
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-09 18:18:47 +01:00
Tim Marx
122020b195 api: prevent null as return value for property type string
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-12-09 18:16:23 +01:00
Tim Marx
e9b2e291c8 api: update cluster status return properties
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-12-09 18:16:23 +01:00
Tim Marx
cd8d0de269 whitespace cleanup
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-12-09 18:16:23 +01:00
Alwin Antreich
4a8145e329 ceph: Create symlink on standalone MGR creation
Ceph MGR fails to start when installed on a node without existing
symlink to /etc/pve/ceph.conf.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2019-12-09 14:11:05 +01:00
Thomas Lamprecht
13411f9938 bulk migration: only pass 'with-local-disks' along if defined
To make it backward compaitble. NBo real harm without this, but lots
of ugly undefiend $val warnings...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-05 13:50:23 +01:00
Thomas Lamprecht
71fd3de92e migration worker: move params to own variable
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-05 13:49:55 +01:00
Thomas Lamprecht
b8122787f2 api: apt versions: handle packages without filename info
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-03 14:12:50 +01:00
Thomas Lamprecht
8e4bee65a3 api/bulk migrate: add comment regarding PID re-used
this needs to be fixed, maybe with pidfd's...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-30 17:13:36 +01:00
Thomas Lamprecht
49652c466f api/bulk migrate: warn if vmlist was empty, die if no worker got spawned
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-30 17:13:36 +01:00
Thomas Lamprecht
6f3d18dd32 api/bulk migrate: split long param list in multiple lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-30 17:06:40 +01:00
Thomas Lamprecht
0b54f653ca api/bulk migrate: rework pre-condition check outputs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-30 17:06:37 +01:00
Tim Marx
d8d1727191 api: add migrate precondition checks to bulk migrate api
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-11-30 15:25:18 +01:00
Tim Marx
fc6b77a1f6 api: add migrate with local disks to bulk migrate api
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-11-30 15:25:18 +01:00
Thomas Lamprecht
2e0f78405d api: apt/versions: track ifupdown and ifupdown2 as optional package
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-30 14:30:58 +01:00
Thomas Lamprecht
481816075e followup: add intermediate directory index for sdn/zones
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-26 17:58:01 +01:00
Alexandre Derumier
bb65469946 api2 : nodes : use zones api status
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-11-26 17:08:23 +01:00
Alexandre Derumier
20dc8bbeb8 api2 : reload : use zones/controllers sdn plugins 2019-11-26 17:08:23 +01:00
Thomas Lamprecht
f6b2b1708f api mon: allow full-mesh routed setup for monitor IP
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-26 15:42:24 +01:00
Thomas Lamprecht
6159470e4d api: network reload: more granular OVS change check
Just because OVS is installed it doesn't mean that OVS interface
(changes) are configured - so check for that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-26 11:43:43 +01:00
Dominik Csapak
29a6f85885 fix #2462: ACMEAccount: make tos in get_tos optional
the code returns undef in case there is no 'tos', and the code
calling this api call handles a non-existing tos already, but
fails in that case becasue of the failing return value verification

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-22 12:19:27 +01:00
Thomas Lamprecht
6fba05b2b6 api/ceph: skip merging metadata if hostname is undefined
It's a bit hard to figure out the exact constellation required for
this to happen, but we saw it in live systems when one node was dead
in a three node cluster.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-21 10:57:50 +01:00
Thomas Lamprecht
ae253364d5 ceph/api: cleanup comment on extra line
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-21 10:57:21 +01:00
Thomas Lamprecht
1b025c2fa0 api: node/config: allow to return only a specific config property
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-19 12:04:52 +01:00
Fabian Grünbichler
516a7948cd use PVE::RRD for RRD data
refactored from PVE::Cluster. same code, same semantics, different file.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 12:25:35 +01:00
Fabian Grünbichler
3ac3653e63 use PVE::DataCenterConfig
to make sure that the corresponding cfs_read_file works() works.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-11-18 12:25:35 +01:00
Thomas Lamprecht
1aaca6fde7 api: ceph/metadata: add structured node versions
include the version as string and as parts, as we do the split
already. Also include the build commit, so if we re-release a ceph
version, we can differ here too.

Use node as key, to make the new entry a bit more general, could be
easily expanded with other infos, if required.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-15 18:36:37 +01:00
Thomas Lamprecht
4cfe5534e2 pveversion: track libspice-server1 (again)
Removed in commit fcb8022169 as we
wanted to re-use Debian Busters upstream version, but we re-uploaded
our own again. And besides that, this version would be still
interesting if it was not uploaded by us..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 18:22:51 +01:00
Christian Ebner
2424074ee7 vzdump: move code needed for cfs register of vzdump.cron to guest-common
This moves the cfs register code for vzdump.cron to the
pve-guest-common package. Therefore, it relies on the corresponding
patches in pve-guest-common and pve-docs as build dependencies.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-18 08:23:40 +02:00
Fabian Grünbichler
d8645329d6 api: subscription: use rpcenv for permission check
commit 2d2ed7ab53 had a valid cause but
unnecessarily used the static PVE::AccessControl::check_permissions.
As the RPCEnvironment based check method has a "$noerr" parameter and
we already have a rpcenv instance readily available, we can use that
one just fine.

this is the last caller of PVE::AccessControl::check_permissions(),
which is the last caller of PVE::AccessControl::permission(). both can
thus be dropped altogether.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-17 16:53:57 +02:00
Alexandre Derumier
e06c0dab3d api2 : network : use vtysh for frr reload instead systemd
avoid extra dep on frr-pythontools and parse error messages

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-19 15:17:09 +02:00
Thomas Lamprecht
084e60304e api network reload: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-05 14:31:24 +02:00
Alexandre Derumier
bc700dbc5b api2: network reload: add frr config generation and reload
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-05 12:29:13 +02:00
Thomas Lamprecht
eb5cc90892 follouwp whitespace/indentation cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-03 10:31:14 +02:00
Alexandre Derumier
4be427a021 api2 : nodes : sdn status endpoint
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 10:28:55 +02:00
Alexandre Derumier
afc237df4e api : cluster ressources : add sdn
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 10:28:55 +02:00
Alexandre Derumier
2bca9b773e api2: network reload : generate local sdn config
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 10:28:55 +02:00
Alexandre Derumier
f0f63a1cb2 api2 : cluster: add sdn api endpoint
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-09-03 10:28:55 +02:00
Thomas Lamprecht
a740deff88 fix typos all over the place
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-03 07:55:32 +02:00
Thomas Lamprecht
e1b5780906 api startall guest: improve descriptions
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-03 07:53:11 +02:00