0

I'm using an All-IN-ONE kolla-ansible wallaby release machine for developing a custom ui for a public cloud. When i try to get summary in RATING admin menu in Horizon this error happens:

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.

I've installed cloudkitty cli using pip in a python virtual env but i can't find how i can change policies. there's noting about that when using -h switch for showing helps.

I've added ceilometer, gnocchi and cloudkitty users to service and admin and other projects as admin but no changes in errors.

Also i've enabled HashMap module for instance service and make a map for service but on instance creation window in horizon price is 0 and there's an error in the api side:

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'

I made changes those python files with this patch and restart the cloudkitty_api docker container, but had no success.

I'm using cloudkitty, ceilometer, gnocchi (kolla containers) to achieve a billing system.

Also i made a downgrade from Wallaby to USSURI but errors are same.

This is my 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"

So any idea?

1 Answers1

-1

First of all, there are Openstack Forums, like LaunchPad or Storyboard to post this Openstack "bugs". I recommend you to use them as there are many more Openstack devs.

Then, this is the Cloudkitty Policy file example, from the Openstack Official Docs: https://docs.openstack.org/cloudkitty/latest/admin/configuration/samples/policy-yaml.html

There, you can set the policies as you wish. There are some files you can "customize" or event "extend" in every project inside Kolla Ansible, like policies files, settings files, etc. You should place this files inside "/etc/kolla/config/NAME_OF_THE_PROJECT". In this case, you should place a file called "policy.yaml" inside "/etc/kolla/config/cloudkitty" in your controller and then deploy or reconfigure kolla-ansible to allow Kolla-Ansible to copy this file inside the container.

The error of showing 0 when creating a VM is kind of normal, as it has not been fixed, but the devs of CK are aware of it.

What I dont find normal is that you get this error, as the logs shows you are the admin and Cloudkitty should allow you to do almost everything. Did you configured anything else?

What I dont understand is