Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

After accidentally deleting a role I can't do anything

I accidentally delete the wrong role in openstack, and now I can't do any command. What should I do to recover that and get admin permissions again.

[root@machine]# openstack role list
+----------------------------------+-------+
| ID                               | Name  |
+----------------------------------+-------+
| 5994235b18c24cfc9d3ea11724aa1ef9 | user  |
| 7a1a4175c9e848118e8602897e943213 | admin |
+----------------------------------+-------+
[root@machine]# openstack role add --project service --user nova admin
ERROR: openstack Conflict occurred attempting to store role grant - User 0675a612e0f64bd89f8511ce0e612b27 already has role 7a1a4175c9e848118e8602897e943213 in tenant f4022aa377364e15ae70dd07f075e515 (HTTP 409) (Request-ID: req-4211dca2-6ee1-4aff-8fb4-bb7c0bdf2bf8)
[root@machine]# openstack role delete 7a1a4175c9e848118e8602897e943213
[root@machine]# openstack role add --project service --user nova admin
ERROR: openstack The request you have made requires authentication. (HTTP 401) (Request-ID: req-f80ae80d-db73-4352-9d18-240f5b1e9710)
[root@machine]# source admin-openrc.sh
[root@machine]# openstack role add --project service --user nova admin
ERROR: openstack The request you have made requires authentication. (HTTP 401) (Request-ID: req-7f2b1943-6a85-41b4-a39f-afcfc2f8be6f)