I guess the issue is with Nova only, Although openstack server list --all-projects --host compute1 is showing correct number of VM but galera is having wrong number of VMs.
MariaDB [nova]> SELECT running_vms FROM compute_nodes WHERE deleted_at IS NULL \G;
*************************** 1. row ***************************
running_vms: 0
*************************** 2. row ***************************
running_vms: 1
*************************** 3. row ***************************
running_vms: 20
I tried to use below variables that also didn't work out:
nova_nova_conf_overrides:
keystone_authtoken:
service_token_roles_required: True
service_token_roles: admin
service_user:
send_service_user_token: True
region_name: "{{ nova_service_region }}"
auth_type: password
username: "{{ nova_service_user_name }}"
password: "{{ nova_service_password }}"
project_name: "{{ nova_service_project_name }}"
user_domain_id: "{{ nova_service_user_domain_id }}"
project_domain_id: "{{ nova_service_project_domain_id }}"
auth_url: "{{ keystone_service_adminurl }}"
insecure: "{{ keystone_service_adminuri_insecure | bool }}"
enforce_scope and enforce_new_defaults default value is false:
cfg.BoolOpt('enforce_scope',
default=False,
help=_('This option controls whether or not to enforce scope '
'when evaluating policies. If ``True``, the scope of '
'the token used in the request is compared to the '
'``scope_types`` of the policy being enforced. If the '
'scopes do not match, an ``InvalidScope`` exception '
'will be raised. If ``False``, a message will be '
'logged informing operators that policies are being '
'invoked with mismatching scope.')),
cfg.BoolOpt('enforce_new_defaults',
default=False,
help=_('This option controls whether or not to use old '
'deprecated defaults when evaluating policies. If '
'``True``, the old deprecated defaults are not going '
'to be evaluated. This means if any existing token is '
'allowed for old defaults but is disallowed for new '
'defaults, it will be disallowed. It is encouraged to '
'enable this flag along with the ``enforce_scope`` '
'flag so that you can get the benefits of new defaults '
'and ``scope_type`` together')),
I have set enforce_scope and enforce_new_defaults to false in /openstack/venvs/nova-23.3.1.dev4/lib/python3.8/site-packages/oslo_policy/tests/test_policy.py file as well but I am still facing same issue.
Regards,
Danish