Freezer dashboard none not of type string

Bug #1958483 reported by alpha23
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kolla-ansible
New
Undecided
Unassigned

Bug Description

Train centos/source
kolla-ansible 9.3.2
ansible 2.8.5

Creating an action in the freezer dashboard results in an incorrectly formatted json file resulting in the following error when trying to attach the action to a job: freezerclient.exceptions.ApiClientException: [*] Error 400: None is not of type 'string'

The following is the created action per the dashboard. Note the lack of strings. Also, timeout and priority need to be integers and not strings.

{'action_id': '0dd5b40f61c144efaa393db98bc4bd6a',
 'freezer_action': {'action': 'backup',
                    'action_id': '0dd5b40f61c144efaa393db98bc4bd6a',
                    'backup_name': 'test011922',
                    'compression': 'gzip',
                    'container': 'freezer_backups',
                    'engine_name': 'tar',
                    'log_file': '/tmp',
                    'max_priority': True,
                    'mode': 'nova',
                    'no_incremental': True,
                    'nova_inst_id': 'a6c7b271-db0d-43de-8af1-0e1fdc55850a',
                    'os_identity_api_version': '3',
                    'priority': None,
                    'src_file': None,
                    'storage': 'swift',
                    'timeout': None},
 'max_retries': 0,
 'max_retries_interval': 0,
 'project_id': '96d55c41d2094f679c37078b034f552e',
 'user_id': '240c5b223f324b5b84471039304fc530'}

Tags: train
alpha23 (alpha23)
description: updated
Revision history for this message
yehaifeng (yehaifeng) wrote :

I have a similar error

2022-07-13 09:15:22.934 39 DEBUG keystoneauth.session [req-b87a8c14-21f3-424c-b192-2b61d3a20246 - - - - -] RESP BODY: {"token": {"methods": ["token", "password"], "user": {"domain": {"id": "default", "name": "Default"}, "id": "35e7b114eaa44b5db1e3596338b2cd86", "name": "admin", "password_expires_at": null}, "audit_ids": ["_KDqFbO1Sg26QrxFKBSqWQ", "xFfJ-NOgSXy_aQM3zWDj0Q"], "expires_at": "2022-07-14T01:03:30.000000Z", "issued_at": "2022-07-13T01:15:22.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id":"24edd907cf934f9886ac5c7a8f1fd378", "name": "admin"}, "is_domain": false, "roles": [{"id": "8fb2d5863d654170add58dd8a9c69a11", "name": "admin"}, {"id": "adb2a5bd6ac8477bb450e9f766d0f3cf", "name": "reader"}, {"id": "ca54011243c4447cbb86c7dbdc9320aa", "name": "heat_stack_owner"}, {"id": "d070a74ff5d9491f8770a4b6817fab5f", "name": "member"}], "catalog": "<removed>"}} _http_log_response /var/lib/kolla/venv/lib/python3.6/site-packages/keystoneauth1/session.py:582
2022-07-13 09:15:22.934 39 DEBUG keystoneauth.session [req-b87a8c14-21f3-424c-b192-2b61d3a20246 - - - - -] GET call to identity forhttps://osk.99bill.com:5000/v3/auth/tokens used request id req-7d8ab912-7e68-40f0-9194-9b5c099cca29 request /var/lib/kolla/venv/lib/python3.6/site-packages/keystoneauth1/session.py:961
2022-07-13 09:15:22.937 39 INFO freezer_api.api.common.utils [req-5c9a1b51-daf0-495e-99b1-4ceae7fd0505 - - - - -] Request context set
2022-07-13 09:15:22.938 39 DEBUG oslo_policy.policy [req-5c9a1b51-daf0-495e-99b1-4ceae7fd0505 - - - - -] enforce: rule="clients:get_all" creds={"auth_token": "***", "domain": null, "global_request_id": null, "is_admin": false, "is_admin_project": true, "project": null, "project_domain": null, "read_only": false, "request_id": "req-5c9a1b51-daf0-495e-99b1-4ceae7fd0505", "resource_uuid": null, "roles": ["admin", "reader", "heat_stack_owner", "member"], "show_deleted": false, "system_scope": null, "tenant": null, "user": null, "user_domain": null, "user_identity": "- - - - -"} target={} enforce /var/lib/kolla/venv/lib/python3.6/site-packages/oslo_policy/policy.py:1005
2022-07-13 09:15:23.061 36 INFO freezer_api.api.common.utils [req-a916b16b-cacc-40f4-a75a-25ffe6116d62 - - - - -] Request context set
2022-07-13 09:15:23.062 36 DEBUG oslo_policy.policy [req-a916b16b-cacc-40f4-a75a-25ffe6116d62 - - - - -] enforce: rule="jobs:create" creds={"auth_token": "***", "domain": null, "global_request_id": null, "is_admin": false, "is_admin_project": true, "project": null, "project_domain": null, "read_only": false, "request_id": "req-a916b16b-cacc-40f4-a75a-25ffe6116d62", "resource_uuid": null, "roles": ["admin", "reader", "heat_stack_owner", "member"], "show_deleted": false, "system_scope": null, "tenant": null, "user": null, "user_domain": null, "user_identity": "- - - - -"} target={} enforce /var/lib/kolla/venv/lib/python3.6/site-packages/oslo_policy/policy.py:1005
2022-07-13 09:15:23.077 36 ERROR root [req-a916b16b-cacc-40f4-a75a-25ffe6116d62 - - - - -] None is not of type 'string': jsonschema.exceptions.ValidationError: None is not of type 'string'

Revision history for this message
yehaifeng (yehaifeng) wrote :

The log of wsgi.py.log

2022-07-13 18:17:14.776 43 ERROR freezer_api.db.sqlalchemy.api [req-69257b23-3555-4ea3-a700-b6c31061695c - - - - -]
        Freezer-api supported by sqlalchemy:
        The option --search in freezer cmd needs a list about {key, value},
        such as:
        '[{"client_id": "node1_2"}]'
        '[{"client_id": "node1_2"}, {"status": "completed"}]'

 json_decode error: Extra data: line 1 column 4 (char 3): json.decoder.JSONDecodeError: Extra data: line 1 column 4 (char 3)
2022-07-13 18:17:14.813 44 INFO freezer_api.api.common.utils [req-66fd6c9d-6524-401d-a91a-c7d4c12977b1 - - - - -] Request context set
2022-07-13 18:17:14.827 44 ERROR root [req-66fd6c9d-6524-401d-a91a-c7d4c12977b1 - - - - -] None is not of type 'string': jsonschema.exceptions.ValidationError: None is not of type 'string'

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.