Commit Graph

143 Commits

Author SHA1 Message Date
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
Christian Ebner
b3d8454221 implement basic wake on LAN functionality
Provides the basic functionality to provide a wake on LAN feature implementation
to start nodes in a cluster from other nodes.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-01-17 11:15:01 +01:00
Thomas Lamprecht
523d5f486b api: move PCI from Scan to Hardware path
as discussed[0] lets move this to /nodes/{node}/hardware/pci

Put this in its own subfolder and adapt module names and paths in UI.

[0]: https://pve.proxmox.com/pipermail/pve-devel/2018-November/034694.html
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 14:20:09 +01:00
Dominik Csapak
ab322f5f83 rename PVE::API2::Storage::Scan to PVE::API2::Scan
and use it in the API

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-19 15:04:31 +01:00
Dominik Csapak
820d0458e7 add /node/{NODE}/hosts API Call
to get and set the content of /etc/hosts

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-09-14 11:47:03 +02:00
Dominik Csapak
73981e3937 fix #1828: check if targetnode exists before starting mass migration
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-08-13 09:00:54 +02:00
Dietmar Maurer
bed5fdfcc9 use new timestamp renderer for /nodes/<nodename>/time
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-07-11 11:27:13 +02:00
Dietmar Maurer
f57cbe5d0b PVE/API2/Nodes.pm: document return properties for cluster node list.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-07-10 14:16:23 +02:00
Dominik Csapak
c6bb589141 startall: refactor and fix error message
for vms, it showed:
Starting VM 100 failed: status

instead of showing the actual status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-06-27 10:52:10 +02:00
Dominik Csapak
3d0fcc467a correct node free calculation
avail - used is wrong
total - used = free

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-14 11:54:16 +02:00
Fabian Grünbichler
036475f89a add certificates API endpoints
to allow retrieval of certificate information, and uploading or removing
of custom certificate files.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-05-02 11:34:52 +02:00
Fabian Grünbichler
c4f78bb7c6 add node configuration file and API
this currently only contains a description and the node-specific ACME
configuration, but I am sure we can find other goodies to put there.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-05-02 11:34:52 +02:00
Dominik Csapak
341422727c add 'service' parameter to syslog api call
so that we can filter the journal by service

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Dominik Csapak
5b46e4322e correct the upgradecmd for xtermjs
use the pveupgrade command directly without bash inbetween,
the incorrect quoting led to '--shell' not being passed to
pveupgrade and closing the connection

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-18 10:05:54 +01:00
Dominik Csapak
4b168c2772 add termproxy api call for nodes
and add dependency for pve-xtermjs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-12-12 08:34:07 +01:00
Emmanuel Kasper
16efab9e10 Add each host SSL fingerprint to each node status
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-11-28 16:13:50 +01:00
Dominik Csapak
cb1b1712c4 make ssh connection transparent
do not use an escape character for the host shell

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-17 10:37:31 +01:00
Dominik Csapak
b8ac8b0cec allow width and height parameter for vncshell
so that novnc can request a different screen size

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-02 09:19:07 +02:00
Dietmar Maurer
892821fd87 pvesr: add pve storage replication tool
Just added code to configure jobs. Replication itself is not
implemented.
2017-05-31 08:23:46 +02:00
Fabian Grünbichler
23b54109a4 fix start on boot
fix the fix for #1024

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-03-24 09:52:28 +01:00
Thomas Lamprecht
1c8dc310b3 remove backup locks when starting all VMs on boot
If on bootup one of our VMs is locked by an backup we safely can
assume that this backup job does not run anymore and that the lock
has no reason anymore and just hinders uptime of services.

As at this time we (the node) have quorum so we may safely assume
that we have a consistent view of the cluster and all our VMs really
belong to us. We just need to ensure that we do not run into an
automatic backup jobs, so execute our code with VZDumps lock or
timeout.
Log in the Task and Sys log that we removed the lock, so that an
admin easily sees that there may be need for cleaning leftovers from
an interrupted backup.

Addresses bug #1024

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-03-16 09:04:21 +01:00