ansible-role-proxmox: Getting error when creating a new cluster
Hello!
Thanks for all your hard work on this. I’ve been setting up my cluster and it runs fine all the way until it has to add a new node to a cluster. I see that the cluster is created and the playbook passes all the tests and reports that things were changed. However, the cluster never gets any new nodes and it actually throws and error.
I get this error:
TASK ERROR: format error at /usr/share/perl5/PVE/JSONSchema.pm line 1866 type: Invalid schema definition. optional: Invalid schema definition. description: Invalid schema definition. format: property is missing and it is not optional
Let me know what logs or whatever you need to debug.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 25 (9 by maintainers)
Commits related to this issue
- Patch pvecm client to work with link0 addr, fix #91 — committed to lae/ansible-role-proxmox by lae 4 years ago
- Patch pvecm client to work with link0 addr, fix #91 — committed to jfpanisset/ansible-role-proxmox by lae 4 years ago
@lae I did some digging through the source code as well as tried some different configurations for the command. It feels like this isn’t a bug in the playbook itself.
Throws out an error, even running the command directly on the host.
If I run the same command with
-use_ssh=no
or without-use_ssh
at all, it works.In the code, there is an entire section dedicated to when the
use_ssh
flag is false.So the error has to happen when it’s set. I followed the code and my hunch is that it happens in this line:
The
link0
flag doesn’t get used at all when use_ssh is not set. I just traced the code as much as I could without running it.Long story short, I think it might be a bug on the parser from the PVE code.
Thanks @Moritz0708 for letting me know how to use that. I’m just now picking up Ansible. That helped me getting the params for the command.
I have the same Error. The 2 Servers not Join the Proxmox Cluster.
Its on the Task: TASK [lae.proxmox : Add node to Proxmox cluster]
Error:
changed: [Proxible-2] => { "changed": true, "cmd": [ "pvecm", "add", "123.456.789.012", "-use_ssh", "-link0", "123.456.789.013" ], "delta": "0:00:01.808788", "end": "2020-05-15 08:51:08.420647", "invocation": { "module_args": { "_raw_params": "pvecm add 123.456.789.012 -use_ssh -link0 123.456.789.013 ", "_uses_shell": false, "argv": null, "chdir": null, "creates": "/etc/pve/corosync.conf", "executable": null, "removes": null, "stdin": null, "stdin_add_newline": true, "strip_empty_ends": true, "warn": true } }, "rc": 0, "start": "2020-05-15 08:51:06.611859", "stderr": "format error at /usr/share/perl5/PVE/JSONSchema.pm line 1866 format: property is missing and it is not optional description: Invalid schema definition. optional: Invalid schema definition. type: Invalid schema definition.", "stderr_lines": [ "format error at /usr/share/perl5/PVE/JSONSchema.pm line 1866 format: property is missing and it is not optional description: Invalid schema definition. optional: Invalid schema definition. type: Invalid schema definition." ], "stdout": "", "stdout_lines": [] }
@lae Sure, it’s pretty plain, mostly defaults:
all.yaml