theforeman / foreman_fog_proxmox

Foreman plugin to add Proxmox compute resource based on fog-proxmox gem
GNU General Public License v3.0
106 stars 33 forks source link

semver fails for PVE 6.0-6 #95

Closed hlawatschek closed 5 years ago

hlawatschek commented 5 years ago

Describe the bug semver initialization and therefore version check fails for PVE 6.0-6

Proxmox version:

pvesh get /version

┌─────────┬──────────┐ │ key │ value │ ├─────────┼──────────┤ │ release │ 6.0 │ ├─────────┼──────────┤ │ repoid │ c71f879f │ ├─────────┼──────────┤ │ version │ 6.0-6 │ └─────────┴──────────┘

Semver error message: Proxmox version 6.0-6.6.0 is not semver suitable

BTW: after disabling version check PVE6 seems to work fine.

Net-Felix commented 5 years ago

how did you disable version check?

hlawatschek commented 5 years ago

Thats a lousy hack. for testing reasons you could modify app/models/foreman_fog_proxmox/proxmox.rb:version_suitable? and return true at the beginning of the function.

But even better you might want to extend lib/foreman_fog_proxmox/semver.rb to support the new versioning ;-)

Xyon commented 5 years ago

To be fair to it, it's not wrong, though - the real issue here is that PVE has decided to make their version a non-semver compliant version. With that being the case, it seems like the wrong direction to adapt "semver.rb" to support what isn't really a semver string, is it?

Xyon commented 5 years ago

Having said that above, the change that resolves this issue is a single character in the regex in that file, so here's a PR for that anyway (#107)

m-bucher commented 5 years ago

Fixed by #99

tristanrobert commented 5 years ago

Proxmox 6.0 API is intentionally rejected by the plugin. Only 5.3, 5.4 are accepted. It would be modified with 0.9.0 fog-proxmox release when it would be suitable (and tested!). See #113