-
-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Describe the bug
When a storage device is available only on one node [Node2], the following error is returned.
"HTTP/1.1 500 storage '[storage]' is not available on node '[node1]'\r\n"
To Reproduce
Steps to reproduce the behavior:
- create a storage device locally on one node
- ensure the storage is listed in the cluster, but with only one node selected.
- create a storage object under the node without access to the storage
- the storage object will attempt to initialize the volumes, but fails with an error.
Expected behavior
no volumes should be returned on storage objects on nodes that are not active.
Desktop (please complete the following information):
- OS: Rocky 9
- Version 0.15.2
Additional context
Update the server.rb initialize method to skip volume init when not enabled.
def initialize(new_attributes = {})
prepare_service_value(new_attributes)
Fog::Proxmox::Attributes.set_attr_and_sym('node_id', attributes, new_attributes)
Fog::Proxmox::Attributes.set_attr_and_sym('storage', attributes, new_attributes)
requires :node_id, :storage
if enabled
initialize_volumes
end
super(new_attributes)
end