Attempting to shutdown an instance in "NOSTATE" gives misleading error message
Bug #1630581 reported by
jichenjc
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Triaged
|
Low
|
Unassigned |
Bug Description
I have a instance not in running state, it's in 'NOSTATE' for some reason, I am able to stop it in CLI but not able to stop in GUI, it tells me
'You are not allowed to shut off: xxxx'
this is misleading given info at
https:/
if policy don't allow me to do this ,we can tell it's
'You are not allowed to shut off: xxxx'
if it's because instance is not capable ,we should say something like
'xxxx not capable of action shut off' so it will be more helpful to debug and know the real cause
Changed in horizon: | |
assignee: | nobody → jichenjc (jichenjc) |
Changed in horizon: | |
assignee: | nobody → Praveen N (praveenn) |
assignee: | Praveen N (praveenn) → nobody |
tags: | added: error-reporting |
summary: |
- No state instance shutdown given misleading info + Attempting to shutdown an instance in "NOSTATE" gives misleading error + message |
Changed in horizon: | |
importance: | Undecided → Low |
To post a comment you must log in.
it's because we didn't distinguish policy check and state check result from line 136 to 138
130 CHECK_FUNCTION" , None) policy_ target( request, datum) check(self. policy_ rules, request, target) and request, datum)) request, datum)
131 def _allowed(self, request, datum):
132 policy_check = getattr(settings, "POLICY_
133
134 if policy_check and self.policy_rules:
135 target = self.get_
136 return (policy_
137 self.allowed(
138 return self.allowed(
139