AttributeError encountered when executing gnocchi metric list related commands using ceilometer and gnocchi: _Environ instance has no attribute ‘。
Control node execution: gnocchi metric list
Traceback (most recent call last):
File “/usr/bin/gnocchi”, line 10, in
sys.exit(main())
File “/usr/lib/python2.7/site-packages/gnocchiclient/shell.py”, line 252, in main
return GnocchiShell().run(args)
File “/usr/lib/python2.7/site-packages/gnocchiclient/shell.py”, line 99, in init
deferred_help=True,
File “/usr/lib/python2.7/site-packages/cliff/app.py”, line 79, in init
self.parser = self.build_option_parser(description, version)
File “/usr/lib/python2.7/site-packages/gnocchiclient/shell.py”, line 130, in build_option_parser
os.environ.set(“OS_AUTH_TYPE”, “password”)
AttributeError: _Environ instance has no attribute ‘set’
Solution:
vi keystonerc_admin
Modify
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=‘openstack password’
export OS_REGION_NAME=RegionOne
export OS_AUTH_URL=http://x.x.x.x:5000/v3
export PS1=’[\u@\h \W(keystone_admin)]$ ’
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3
export OS_PLACEMENT_API_VERSION=1.17
export OS_AUTH_TYPE=password
At this point the following command can be used in the terminal:
source ~/keystonerc_admin
gnocchi metric list
gnocchi metric list | grep cpu
gnocchi resource list
gnocchi resource list --type image
gnocchi measures show 839afa02-1668-4922-a33e-6b6ea7780715
Read More:
- [Solved] redis Error: AttributeError: ‘list‘ object has no attribute ‘decode‘
- [Jeston Xavier NX Compile librealsense Error] AttributeError: module ‘pyrealsense2‘ has no attribute ‘pipeline‘
- Yolox_s.pth Convert to tensorRT Error: AttributeError: ‘tensorrt.tensorrt.Builder‘ object has no attribute ‘max_workspace_size‘
- ROS package executes rosrun error: attributeerror: ‘thread’ object has no attribute ‘isalive‘
- [Solved] OpenCV Error: AttributeError: module ‘cv2‘ has no attribute ‘data‘
- [Solved] AttributeError: ‘depthai.node.ObjectTracker‘ object has no attribute ‘setTrackerIdAssigmentPolicy‘
- Pyqt5 Error: AttributeError: ‘QWidget‘ object has no attribute ‘setCentralWidget‘
- [Solved] AttributeError: module ‘keras.preprocessing.image‘ has no attribute ‘load_img‘
- [Solved] AttributeError: ‘openvino.inference_engine.ie_api.IENetwork‘ object has no attribute ‘input_info‘
- PySpark error: AttributeError: ‘NoneType‘ object has no attribute ‘_jvm‘
- [Solved] AttributeError : ‘GridSearchCV‘ object has no attribute ‘grid_scores_‘
- TensorFlow error: AttributeError: module ‘tensorflow_core._api.v2.train’ has no attribute ‘Optimizer‘
- [Solved] AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘
- [Solved] Raspberry Pi Error: AttributeError: module ‘serial‘ has no attribute ‘Serial‘
- Tensorflow error: attributeerror: module ‘tensorflow_ API. V1. Train ‘has no attribute’ summarywriter ‘
- Numpy.exp Function Error ‘Float’ object has no attribute ‘exp’
- [Solved] Eureka related services Start Error: cannot execute request on any known server
- VSCode Terminal Execute tsc Commands Error [Solved]
- [Solved] docker Commands Execute Error: Segmentation fault
- Pytorch error: `module ‘torch‘ has no attribute ‘__version___‘`