mirror of
https://github.com/Corsinvest/cv4pve-autosnap.git
synced 2026-04-25 08:55:49 +03:00
[GH-ISSUE #21] Exit Code #18
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cv4pve-autosnap#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @plant75 on GitHub (Sep 16, 2019).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-autosnap/issues/21
Hello Daniele,
i have a strange result putting your great script inside a check script:
This is my routine:
if
cv4pve-autosnap --host=127.0.0.1 --username=cv4pve@pve --password=xxx--vmid="all" snap --label='daily' --keep=15then
echo "SNAP created"
else
notify "ERROR-SNAP-CVS"
exit 1
fi
When i put it on my crontab, i hav always the error exit code but the script was executed ..
Thanks!
@franklupo commented on GitHub (Sep 16, 2019):
I
can execute with --deb parameter and send me uoput?
Attention in the output is present the password.
Best regards
@plant75 commented on GitHub (Sep 16, 2019):
if
cv4pve-autosnap --host=127.0.0.1 --username=cv4pve@pve --password=Azxd34Der455Xse --vmid="all" snap --label='daily' --keep=15 --debthen
echo "SNAP CREATI"
else
echo "-->" $?
exit 1
fi
Output:
/etc/CV4.bash: line 27: Specify: command not found
--> 127
@franklupo commented on GitHub (Sep 16, 2019):
Sorry --debug and execute without if
@franklupo commented on GitHub (Sep 19, 2019):
News?
@plant75 commented on GitHub (Sep 20, 2019):
Without if something like this:
=============================
VM 109 consider enabling QEMU agent see https://pve.proxmox.com/wiki/Qemu-guest-agent
Phase: snap-create-pre
Create snapshot: autodaily190920102458
Method: GET, Url: https://127.0.0.1:8006/api2/json/nodes/testpve2/qemu/109/snapshot
StatusCode: OK
ReasonPhrase: OK
IsSuccessStatusCode: True
{
"data": [
{
"description": "cv4pve-autosnap",
"snaptime": 1568967876,
"name": "autodaily190920102436",
"vmstate": 0
},
{
"parent": "autodaily190920102436",
"name": "current",
"description": "You are here!",
"running": 0,
"digest": "51fe510f41da2171e148161e36f41baa769c3ae1"
}
]
}
Method: POST, Url: https://127.0.0.1:8006/api2/json/nodes/testpve2/qemu/109/snapshot
Parameters:
snapname : autodaily190920102458
description : cv4pve-autosnap
vmstate : 0
StatusCode: OK
ReasonPhrase: OK
IsSuccessStatusCode: True
{
"data": "UPID:testpve2:00005E3A:04077ECF:5D848CDA:qmsnapshot:109:cv4pve@pve:"
}
Method: GET, Url: https://127.0.0.1:8006/api2/json/nodes/testpve2/tasks/UPID:testpve2:00005E3A:04077ECF:5D848CDA:qmsnapshot:109:cv4pve@pve:/status
StatusCode: OK
ReasonPhrase: OK
IsSuccessStatusCode: True
{
"data": {
"exitstatus": "OK",
"starttime": 1568967898,
"pid": 24122,
"upid": "UPID:testpve2:00005E3A:04077ECF:5D848CDA:qmsnapshot:109:cv4pve@pve:",
"type": "qmsnapshot",
"node": "testpve2",
"status": "stopped",
"user": "cv4pve@pve",
"id": "109",
"pstart": 67600079
}
}
Method: GET, Url: https://127.0.0.1:8006/api2/json/nodes/testpve2/qemu/109/snapshot
StatusCode: OK
ReasonPhrase: OK
IsSuccessStatusCode: True
{
"data": [
{
"description": "cv4pve-autosnap",
"snaptime": 1568967876,
"name": "autodaily190920102436",
"vmstate": 0
},
{
"vmstate": 0,
"parent": "autodaily190920102436",
"snaptime": 1568967898,
"name": "autodaily190920102458",
"description": "cv4pve-autosnap"
},
{
"digest": "fc1d4c8e943aabe056afdc7713b832ee28429318",
"running": 0,
"parent": "autodaily190920102458",
"name": "current",
"description": "You are here!"
}
]
}
Phase: snap-create-post
Method: GET, Url: https://127.0.0.1:8006/api2/json/nodes/testpve2/qemu/109/snapshot
StatusCode: OK
ReasonPhrase: OK
IsSuccessStatusCode: True
{
"data": [
{
"description": "cv4pve-autosnap",
"vmstate": 0,
"parent": "autodaily190920102436",
"snaptime": 1568967898,
"name": "autodaily190920102458"
},
{
"description": "cv4pve-autosnap",
"vmstate": 0,
"name": "autodaily190920102436",
"snaptime": 1568967876
},
{
"digest": "fc1d4c8e943aabe056afdc7713b832ee28429318",
"running": 0,
"parent": "autodaily190920102458",
"name": "current",
"description": "You are here!"
}
]
}
Phase: snap-job-end
@franklupo commented on GitHub (Sep 20, 2019):
Hi,
you are specify --vmid=all please send me all output
best regards
@franklupo commented on GitHub (Sep 30, 2019):
News?