Commit Graph

163 Commits

Author SHA1 Message Date
Thomas Lamprecht
6110ed0348 api: nodes: whitespace cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-04 11:58:55 +02:00
Thomas Lamprecht
c6c4b2788d api: node: add capabilities path and move qemu machines over
avoid further crowding the top-level node API path with such
"what can some part of the node currently do" stuff, rather move it
down.

The QEMU cpu stuff should move also down there.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 21:31:32 +01:00
Thomas Lamprecht
5a378425b8 api: nodes: sort use statements
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 21:31:32 +01:00
Stefan Reiter
32ad9758a2 api: register Qemu::Machine call
as 'machine-types', so it is clear this refers to QEMU machines, not the
local machine (as one might think, this being a 'node' API call).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 21:31:32 +01:00
Thomas Lamprecht
784d6ee9b4 api: nodes: sort index
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 21:31:32 +01:00
Thomas Lamprecht
f5b6ccb1d5 api: fixup: commit change to storage module
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-02 11:45:33 +01:00
Thomas Lamprecht
f24be7e72d api: nodes: allow root to pass arbitrary arguments to commands
If the command itself allows it, which normally means it has good
verification of passed arguments.

We may want to re-evaluate security here if we allow execution for a
group of non-root users.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-22 17:59:36 +01:00
Thomas Lamprecht
ecddd2e231 Revert "Close #1623: replace apt-get to apt"
This reverts commit 19137ed620.
2020-07-08 10:55:56 +02:00
Moayad Almalat
19137ed620 Close #1623: replace apt-get to apt
Signed-off-by: Moayad Almalat <m.almalat@proxmox.com>
2020-07-07 18:52:28 +02:00
Thomas Lamprecht
d6e7fa0404 api nodes/netstat: cleanup indentation and refactor slightly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-03 08:06:44 +02:00
Thomas Lamprecht
677bee7c57 api/nodes: factor out getting VNC connection info
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-01 09:02:49 +02:00
Stefan Reiter
01ac98c702 api: register /nodes/X/cpu call for CPU models
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-06-17 15:51:11 +02:00
Fabian Grünbichler
1a664b0f9d api: improve node index with missing/broken cert
since this API endpoint is used for the node selector in the GUI, which
causes quite widespread breakage.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-06-02 10:28:56 +02: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
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
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
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
Alexandre Derumier
4be427a021 api2 : nodes : sdn status 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
Tim Marx
4a512d7a2e api: fix nodes stats memory return type description
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-08-26 13:36:48 +02:00
Thomas Lamprecht
7618913027 perl: fix some common typos found with codespell
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-15 10:40:20 +02:00
Thomas Lamprecht
180a86d39a pvecfg: adapt version and release semantic
Wit commit a74ba607d4 we switched over
to using the dpkg-dev provided helpers to set package version,
architecture and such in the buildsystem.

But unlike other repositories we used the version also for giving it
back over the API through the during build generated PVE::pvecfg
module, which wasn't fully updated to the new style.

This patch does that, and also cleans up semantics a bit, the
following two changed:

release is now the Debian release, instead of the "package release"
(i.e., the -X part of a full package version).
version is now simply the full (pve-manager) version, e.g., 6.0-1 or
the currently for testing used 6.0-0+1

This allows to do everything we used this information for even in a
slightly easier way (no  string concat needed anymore), and fits also
with the terminology we often used in our public channels (mailing
lists, forum, website)

Remove some cruft as we touch things.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 16:11:43 +02:00
Thomas Lamprecht
961399a308 api/nodes journal: fix parameter types and add minimum
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-15 16:12:20 +02:00
Thomas Lamprecht
a03cb8b89e partially revert "api/nodes journal: add and enforce parameter conflicts"
This partially reverts commit f9b08743a5
as we had some wrong assumptions about lastentries and the other
params, so just note conflicts in the description but let the tool
itself make the checks

This reverts commit f9b08743a5.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-15 16:05:19 +02:00
Thomas Lamprecht
f9b08743a5 api/nodes journal: add and enforce parameter conflicts
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-15 15:16:22 +02:00
Thomas Lamprecht
952280b49a api/nodes: add journal to index
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-15 15:15:51 +02:00
Dominik Csapak
1d397a8394 node: add journal api
this uses the new journalreader instead of journalctl, which is a bit
faster and can read from/to cursor and returns a start/end cursor

also you can give an unix epoch as time parameters

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-15 12:09:26 +02:00
Thomas Lamprecht
fc1da3b020 api: handle undefined shellcmd parameter better
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-24 11:27:52 +00:00
Thomas Lamprecht
57d56896c8 fix #263: only include node rrd stats if user has Sys.Audit
It makes sense to not give users without Sys.Audit permissions to
much information over a node and this is relatively easy and cheap to
check and enforce at those two points.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Oguz Bektas <o.bektas@proxmox.com>
2019-04-16 12:28:42 +00:00
Tim Marx
c3b04731bb add pveceph install to shell api
Signed-off-by: Tim Marx <t.marx@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-02-28 13:21:21 +01:00
Thomas Lamprecht
d4a25f0b88 followup: fix whitespace error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-02-28 13:05:46 +01:00
Tim Marx
2d39fd70d5 deprecate old upgrade property
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-02-28 13:04:23 +01:00
Thomas Lamprecht
dab7a849db api/nodes: fix variable name style: s/cmdMapper/shell_cmd_map/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-02-28 13:04:10 +01:00
Tim Marx
d03d7e1eee unified the classification of the passed command for all shell apis
As discussed on the pve-devel list [0] I extracted the identical chunks from each
shell api into one function as basis for future changes.

[0] https://pve.proxmox.com/pipermail/pve-devel/2019-January/035387.html

Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-02-28 11:32:18 +01:00
Thomas Lamprecht
f9d26e098f trailing whitespace fix in Nodes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-02-27 13:39:32 +01:00
Oguz Bektas
e50456078b fix #1769: restart mode for bulk lxc migration
online mode doesn't work, and causes bulk migration of
running lxc containers to fail.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-02-19 11:53:15 +01:00
Christian Ebner
5aa7b909b1 Add bash completion for wakeonlan API call
This adds the bash completion for the wakeonlan API call.
The bash completion returns only those nodes which are offline according to the
member status.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-01-28 17:28:34 +01:00
Thomas Lamprecht
ec1788043c api/wakeonlan: add description to return schema
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-22 12:19:07 +01:00
Christian Ebner
0f615ea9df pvenode: Return MAC address used for WoL call on success
Use the new format to verify the MAC addresses.
The wakeonlan API call now returns the MAC address of the node to wake on
successful sending of the WoL packet.
pvenode finally displays this MAC address to the user as feedback.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-01-22 12:05:47 +01:00
Thomas Lamprecht
824369963b wakeonlan: we cannot wake ourself
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-01-21 16:49:34 +01:00
Christian Ebner
6f712496d8 Nodes: Check if target node even exists before sending WOL packet
Checks if the specified target node even exists before trying to read its MAC
address from the config and sending the wake on LAN magic packet.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-01-21 16:22:12 +01:00