Activity log for bug #2058069

Date Who What changed Old value New value Message
2024-03-15 20:50:27 Jorge Merlino bug added bug
2024-03-15 20:53:10 Jorge Merlino description When configuring multiple cinder storage backends in glance-api.conf a volume type must be configured using the cinder_volume_type configuration option. If this parameter is set but not all of these parameters are set also: cinder_store_user_name cinder_store_password cinder_store_project_name cinder_store_auth_address glance-api will not start. These last four parameters are supposed to be optional and the default context should be used if they are not present. The issue arises on the _drivers/cinder/store.py file, in particular starting on the configure_add function. This function invokes self.get_cinderclient() (line 533) with no parameters if cinder_volume_type is present so in this function context is None and legacy_update is False (default values of the parameters). So, if any of the mentioned four parameters is not set the self.is_user_overriden() method call will return false. In this case, where legacy_update and user_overriden are both false get_cinderclient will reach line 606 where username is set to context.user_id. But in this function path, context still has its default value (None) and glance-api will fail showing this error in the systemd journal: ERROR: 'NoneType' object has no attribute 'user_id' In this case, context should be set to the default context before reaching this line. When configuring multiple cinder storage backends in glance-api.conf a volume type must be configured using the cinder_volume_type configuration option. If this parameter is set but not all of these parameters are set also: cinder_store_user_name cinder_store_password cinder_store_project_name cinder_store_auth_address glance-api will not start. These last four parameters are supposed to be optional and the default context should be used if they are not present. The issue arises on the _drivers/cinder/store.py file, in particular starting on the configure_add function. This function invokes self.get_cinderclient() (line 533) with no parameters if cinder_volume_type is present. So in this function invocation the context paramter is None and the legacy_update parameter is False (default values of the parameters). So, if any of the mentioned four parameters is not set, the self.is_user_overriden() method call will return false. In this case, where legacy_update and user_overriden are both false get_cinderclient will reach line 606 where username is set to context.user_id. But in this function path, context still has its default value (None) and glance-api will fail showing this error in the systemd journal: ERROR: 'NoneType' object has no attribute 'user_id' In this case, context should be set to the default context before reaching this line.
2024-03-15 20:54:30 Jorge Merlino description When configuring multiple cinder storage backends in glance-api.conf a volume type must be configured using the cinder_volume_type configuration option. If this parameter is set but not all of these parameters are set also: cinder_store_user_name cinder_store_password cinder_store_project_name cinder_store_auth_address glance-api will not start. These last four parameters are supposed to be optional and the default context should be used if they are not present. The issue arises on the _drivers/cinder/store.py file, in particular starting on the configure_add function. This function invokes self.get_cinderclient() (line 533) with no parameters if cinder_volume_type is present. So in this function invocation the context paramter is None and the legacy_update parameter is False (default values of the parameters). So, if any of the mentioned four parameters is not set, the self.is_user_overriden() method call will return false. In this case, where legacy_update and user_overriden are both false get_cinderclient will reach line 606 where username is set to context.user_id. But in this function path, context still has its default value (None) and glance-api will fail showing this error in the systemd journal: ERROR: 'NoneType' object has no attribute 'user_id' In this case, context should be set to the default context before reaching this line. When configuring multiple cinder storage backends in glance-api.conf a volume type must be configured using the cinder_volume_type configuration option. If this parameter is set but not all of these parameters are set also: cinder_store_user_name cinder_store_password cinder_store_project_name cinder_store_auth_address glance-api will not start. These last four parameters are supposed to be optional and the default context should be used if they are not present. The issue arises on the _drivers/cinder/store.py file, in particular starting on the configure_add function. This function invokes self.get_cinderclient() (line 533) with no parameters if cinder_volume_type is present. So, in this function invocation the context paramter is None and the legacy_update parameter is False (default values of the parameters). Thus, if any of the mentioned four parameters is not set, the self.is_user_overriden() method call will return false. In this case, where legacy_update and user_overriden are both false get_cinderclient will reach line 606 where username is set to context.user_id. But in this function path, context still has its default value (None) and glance-api will fail showing this error in the systemd journal: ERROR: 'NoneType' object has no attribute 'user_id' In this case, context should be set to the default context before reaching this line.
2024-03-15 20:55:08 Jorge Merlino description When configuring multiple cinder storage backends in glance-api.conf a volume type must be configured using the cinder_volume_type configuration option. If this parameter is set but not all of these parameters are set also: cinder_store_user_name cinder_store_password cinder_store_project_name cinder_store_auth_address glance-api will not start. These last four parameters are supposed to be optional and the default context should be used if they are not present. The issue arises on the _drivers/cinder/store.py file, in particular starting on the configure_add function. This function invokes self.get_cinderclient() (line 533) with no parameters if cinder_volume_type is present. So, in this function invocation the context paramter is None and the legacy_update parameter is False (default values of the parameters). Thus, if any of the mentioned four parameters is not set, the self.is_user_overriden() method call will return false. In this case, where legacy_update and user_overriden are both false get_cinderclient will reach line 606 where username is set to context.user_id. But in this function path, context still has its default value (None) and glance-api will fail showing this error in the systemd journal: ERROR: 'NoneType' object has no attribute 'user_id' In this case, context should be set to the default context before reaching this line. When configuring multiple cinder storage backends in glance-api.conf a volume type must be configured using the cinder_volume_type configuration option. If this parameter is set but not all of these parameters are set also: cinder_store_user_name cinder_store_password cinder_store_project_name cinder_store_auth_address glance-api will not start. These last four parameters are supposed to be optional and the default context should be used if they are not present. The issue arises on the _drivers/cinder/store.py file, in particular starting on the configure_add function. This function invokes self.get_cinderclient() (line 533) with no parameters if cinder_volume_type is present. So, in this function invocation the context paramter is None and the legacy_update parameter is False (default values of the parameters). Thus, if any of the mentioned four parameters is not set, the self.is_user_overriden() method call will also return false. In this case, where legacy_update and user_overriden are both false, get_cinderclient will reach line 606 where username is set to context.user_id. But in this function path, context still has its default value (None) and glance-api will fail showing this error in the systemd journal: ERROR: 'NoneType' object has no attribute 'user_id' In this case, context should be set to the default context before reaching this line.
2024-03-16 00:12:42 Nobuto Murata bug added subscriber Nobuto Murata