lae / ansible-role-proxmox

IaC for Proxmox VE clusters.
MIT License
496 stars 144 forks source link

Unable to create pve_storages using example data #214

Closed JohanLeirnes closed 1 year ago

JohanLeirnes commented 1 year ago
   - name: ceph1
     type: rbd
     content: [ "images", "rootdir" ]
     nodes: [ "proxmox-01-node-01.local", "proxmox-01-node-02.local", "proxmox-01-node-03.local" ]
     username: nvadmin
     pool: hdd
     krbd: yes
     monhost:
       - 192.168.1.241
       - 192.168.1.242
       - 192.168.1.243
   - name: cephfs1
     type: cephfs
     content: [ "snippets", "vztmpl", "iso"  ]
     nodes: [ "proxmox-01-node-01.local", "proxmox-01-node-02.local", "proxmox-01-node-03.local" ]
     username: nvadmin
     monhost:
       - 192.168.1.241
       - 192.168.1.242
       - 192.168.1.243

When i use this code i get this error while running it.

failed: [proxmox-01-node-01] (item={'name': 'ceph1', 'type': 'rbd', 'content': ['images', 'rootdir'], 'nodes': ['proxmox-01-node-01.local', 'proxmox-01-node-02.local', 'proxmox-01-node-03.local'], 'username': 'nvadmin', 'pool': 'hdd', 'krbd': True, 'monhost': ['192.168.1.241', '192.168.1.242', '192.168.1.243']}) => {"ansible_loop_var": "item", "changed": false, "item": {"content": ["images", "rootdir"], "krbd": true, "monhost": ["192.168.1.241", "192.168.1.242", "192.168.1.243"], "name": "ceph1", "nodes": ["proxmox-01-node-01.local", "proxmox-01-node-02.local", "proxmox-01-node-03.local"], "pool": "hdd", "type": "rbd", "username": "nvadmin"}, "msg": "nodes: invalid format - value does not look like a valid node name\n", "name": "ceph1"}

failed: [proxmox-01-node-01] (item={'name': 'cephfs1', 'type': 'cephfs', 'content': ['snippets', 'vztmpl', 'iso'], 'nodes': ['proxmox-01-node-01.local', 'proxmox-01-node-02.local', 'proxmox-01-node-03.local'], 'username': 'nvadmin', 'monhost': ['192.168.1.241', '192.168.1.242', '192.168.1.243']}) => {"ansible_loop_var": "item", "changed": false, "item": {"content": ["snippets", "vztmpl", "iso"], "monhost": ["192.168.1.241", "192.168.1.242", "192.168.1.243"], "name": "cephfs1", "nodes": ["proxmox-01-node-01.local", "proxmox-01-node-02.local", "proxmox-01-node-03.local"], "type": "cephfs", "username": "nvadmin"}, "msg": "nodes: invalid format - value does not look like a valid node name\n", "name": "cephfs1"}

nodes: invalid format?

lae commented 1 year ago

which task is that error on?

JohanLeirnes commented 1 year ago

Hi, it's on this task: TASK [lae.proxmox : Configure Proxmox Storage]

lae commented 1 year ago

Are those the correct names for the nodes? e.g. are you sure it's proxmox-01-node-03.local instead of proxmox-01-node-03? I think you can double check by running pvecm status on one of the nodes.

JohanLeirnes commented 1 year ago

hmm pvecm status does not show any name. I will try without local

lae commented 1 year ago

I currently don't have access to a cluster so couldn't check pvecm myself, sorry. Alternatively, I think the names PVE expects are the ones you would see in the web GUI, like this:

image

If they are matching then I'll see if I can debug by bringing up a test cluster. It's possible something may have changed but I doubt it (since this seems like a bad breaking change).

wu3rstle commented 1 year ago

@JohanLeirnes the names are shown in pvecm nodes

JohanLeirnes commented 1 year ago

Thanks! that was the issue!