diff --git a/confluent_server/aiohmi/redfish/command.py b/confluent_server/aiohmi/redfish/command.py index b97b229a..31545b1f 100644 --- a/confluent_server/aiohmi/redfish/command.py +++ b/confluent_server/aiohmi/redfish/command.py @@ -321,17 +321,18 @@ class Command(object): } return names - async def _account_url_info_by_id(self, uid): + async def _account_url_info_by_id(self, uid, cache=True): srvurl = await self._accountserviceurl() oem = await self.oem() if srvurl: - srvinfo = await self._do_web_request(srvurl) + srvinfo = await self._do_web_request(srvurl, cache=cache) srvurl = srvinfo.get('Accounts', {}).get('@odata.id', None) if srvurl: - srvinfo = await self._do_web_request(srvurl) + srvinfo = await self._do_web_request(srvurl, cache=cache) accounts = srvinfo.get('Members', []) for account in accounts: - accinfo = await self._do_web_request(account['@odata.id']) + accinfo = await self._do_web_request(account['@odata.id'], + cache=cache) currid = accinfo.get('Id', None) if str(currid) == str(uid): accinfo['expiration'] = await oem.get_user_expiration( diff --git a/confluent_server/aiohmi/redfish/oem/generic.py b/confluent_server/aiohmi/redfish/oem/generic.py index 942b1ffa..23d08719 100644 --- a/confluent_server/aiohmi/redfish/oem/generic.py +++ b/confluent_server/aiohmi/redfish/oem/generic.py @@ -795,7 +795,10 @@ class OEMHandler(object): # that is for break await asyncio.sleep(3) - if not await fishclient._account_url_info_by_id(uid): + # Uncached: a delete that failed left the account collection in the + # url cache as it was before, and answering this from that snapshot + # could only ever say the account is still there + if not await fishclient._account_url_info_by_id(uid, cache=False): return True try: await fishclient.set_user_password(uid, base64.b64encode(os.urandom(15)))