我正在使用 All-IN-ONE kolla-ansible
wallaby 发布机为公共云开发自定义 UI。当我尝试在RATING
管理菜单中获取摘要时,Horizon
发生了以下错误:
2021-10-14 11:46:19.756 28 ERROR cloudkitty.common.policy ...
- default default] Policy check for report:get_summary failed with credentials {'user': '2e69fcab25f8423693661478d155dca1', 'tenant': '66233f955a644a7586aab636e78a5a4a', 'system_scope': None, 'project': '66233f955a644a7586aab636e78a5a4a', 'domain': None, 'user_domain': 'default', 'project_domain': 'default', 'is_admin': True, 'read_only': False, 'show_deleted': False, 'auth_token': 'gAAAAABhaBiLpir5wU9Cw5Guv9sb2n4H45dkJACzC0KkgZNvioDBN1GCnOxXlZ-Wa9KUj_eJRuavqXISEckq-d37m9MBfeCGrY9S06K-09B1R5Pk8bEdNkVfCmJ7pBhabjVJNMgZK4xTVW2vhknchr3b9ATZsSzLRNq1CR__NETnPfJsBTv0-9jn0NorMMVSIDOp3V0G1dbK', 'request_id': 'req-f6ff3382-22e8-4310-a944-6dff7e07a656', 'global_request_id': None, 'resource_uuid': None, 'roles': ['admin', '_member_', 'reader', 'member'], 'user_identity': '2e69fcab25f8423693661478d155dca1 66233f955a644a7586aab636e78a5a4a - default default', 'is_admin_project': True}:
cloudkitty.common.policy.PolicyNotAuthorized: Policy doesn't allow report:get_summary to be performed.
我已经cloudkitty
在 python 虚拟环境中使用 pip 安装了 cli,但我找不到如何更改策略。当使用-h
switch 显示帮助时没有注意到这一点。
我已将和用户添加ceilometer
到服务和管理员以及其他项目作为管理员gnocchi
,cloudkitty
但错误没有变化。
另外,我已经HashMap
为实例服务启用了模块并为服务创建了地图,但在实例创建窗口中horizon
价格为 0,并且 api 端出现错误:
2021-10-14 11:50:45.156 28 ERROR wsme.api [req-fd3ab604-bb45-40c7-9965-f2c51c448256 2e69fcab25f8423693661478d155dca1 66233f955a644a7586aab636e78a5a4a - default default] Server-side error: "'list' object has no attribute 'start'
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming
res = self.dispatcher.dispatch(message)
File "/usr/lib/python3.6/site-packages/oslo_messaging/rpc/dispatcher.py", line 309, in dispatch
return self._do_dispatch(endpoint, method, ctxt, args)
File "/usr/lib/python3.6/site-packages/oslo_messaging/rpc/dispatcher.py", line 229, in _do_dispatch
result = func(ctxt, **new_args)
File "/usr/lib/python3.6/site-packages/cloudkitty/orchestrator.py", line 120, in quote
return str(worker.quote(res_data))
File "/usr/lib/python3.6/site-packages/cloudkitty/orchestrator.py", line 223, in quote
processor.obj.quote(res_data)
File "/usr/lib/python3.6/site-packages/cloudkitty/rating/__init__.py", line 106, in quote
return self.process(data)
File "/usr/lib/python3.6/site-packages/cloudkitty/rating/hash/__init__.py", line 262, in process
output = dataframe.DataFrame(start=data.start, end=data.end)
AttributeError: 'list' object has no attribute 'start'
". Detail:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/wsmeext/pecan.py", line 85, in callfunction
result = f(self, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/cloudkitty/api/v1/controllers/rating.py", line 205, in quote
res = client.call({}, 'quote', res_data=[{'usage': res_dict}])
File "/usr/lib/python3.6/site-packages/oslo_messaging/rpc/client.py", line 179, in call
transport_options=self.transport_options)
File "/usr/lib/python3.6/site-packages/oslo_messaging/transport.py", line 128, in _send
transport_options=transport_options)
File "/usr/lib/python3.6/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 682, in send
transport_options=transport_options)
File "/usr/lib/python3.6/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 672, in _send
raise result
AttributeError: 'list' object has no attribute 'start'
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming
res = self.dispatcher.dispatch(message)
File "/usr/lib/python3.6/site-packages/oslo_messaging/rpc/dispatcher.py", line 309, in dispatch
return self._do_dispatch(endpoint, method, ctxt, args)
File "/usr/lib/python3.6/site-packages/oslo_messaging/rpc/dispatcher.py", line 229, in _do_dispatch
result = func(ctxt, **new_args)
File "/usr/lib/python3.6/site-packages/cloudkitty/orchestrator.py", line 120, in quote
return str(worker.quote(res_data))
File "/usr/lib/python3.6/site-packages/cloudkitty/orchestrator.py", line 223, in quote
processor.obj.quote(res_data)
File "/usr/lib/python3.6/site-packages/cloudkitty/rating/__init__.py", line 106, in quote
return self.process(data)
File "/usr/lib/python3.6/site-packages/cloudkitty/rating/hash/__init__.py", line 262, in process
output = dataframe.DataFrame(start=data.start, end=data.end)
AttributeError: 'list' object has no attribute 'start'
我用这个修改了那些python文件修补并重新启动cloudkitty_api
docker容器,但是没有成功。
我正在使用
cloudkitty
、、 (kollaceilometer
容器gnocchi
)来实现计费系统。
我也从 降级到Wallaby
但USSURI
错误是一样的。
这是我的kolla-ansible
global.yml
config_strategy: "COPY_ALWAYS"
kolla_base_distro: "ubuntu"
kolla_install_type: "source"
openstack_release: "wallaby"
kolla_internal_vip_address: "192.168.76.10"
network_interface: "eno1"
neutron_external_interface: "eno2"
neutron_plugin_agent: "openvswitch"
enable_haproxy: "no"
enable_ceilometer: "yes"
enable_cinder: "yes"
enable_cinder_backup: "no"
enable_cinder_backend_lvm: "no"
enable_cloudkitty: "yes"
enable_gnocchi: "yes"
enable_neutron_provider_networks: "yes"
ceph_cinder_keyring: "ceph.client.admin.keyring"
ceph_cinder_user: "admin"
ceph_cinder_pool_name: "volumes"
fernet_token_expiry: 86400
cinder_backend_ceph: "yes"
cinder_volume_group: "volumes"
nova_compute_virt_type: "kvm"
nova_console: "novnc"
enable_openstack_core: "yes"
那么有什么想法吗?
答案1
首先,有 Openstack 论坛,如 LaunchPad 或 Storyboard 来发布 Openstack “bug”。我建议你使用它们,因为那里有更多的 Openstack 开发人员。
然后,这是 Cloudkitty 策略文件示例,来自 Openstack 官方文档:https://docs.openstack.org/cloudkitty/latest/admin/configuration/samples/policy-yaml.html
在那里,您可以根据需要设置策略。Kolla Ansible 中的每个项目中都有一些文件可以“自定义”或“扩展”,例如策略文件、设置文件等。您应该将这些文件放在“/etc/kolla/config/NAME_OF_THE_PROJECT”中。在这种情况下,您应该将一个名为“policy.yaml”的文件放在控制器中的“/etc/kolla/config/cloudkitty”中,然后部署或重新配置 kolla-ansible 以允许 Kolla-Ansible 将此文件复制到容器内。
创建虚拟机时显示 0 的错误是正常的,因为它尚未修复,但 CK 的开发人员已经意识到了这一点。
我觉得不正常的是,您收到此错误,因为日志显示您是管理员,Cloudkitty 应该允许您执行几乎所有操作。您还配置了其他内容吗?
我不明白的是