Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

create_pool_registration deployment issue where resource does not exist when called in create_application_registration() #212

Closed
andrew-slutsky opened this issue Oct 27, 2020 · 2 comments · Fixed by #236
Assignees

Comments

@andrew-slutsky
Copy link
Contributor

Information

  • Onefuzz version: 1.4.0
  • OS: Windows

Provide detailed reproduction steps (if any)

  1. Creating a pool registration fails the first time I do a deployment. I think it's due to creating the an application and then immediately running az_cli to do the "rest" call in register_pool_application:create_application_registration() but of course, it works perfectly if I run the deployment script again. I have reproduced the issue several times.

Expected result

Successful deployment

Actual result

$ python deploy.py westus2 example01 example01 "email@microsoft.com" --export_appinsights --create_pool_registration True
INFO:deploy:checking if RBAC already exists
...

...
INFO:deploy:deploying function app api-service.zip
INFO:deploy:adding appinsight log export
INFO:deploy:Updating application registration
DEBUG:msrest.async_paging:Paging async iterator protocol is not available for ApplicationPaged
DEBUG:msrest.async_paging:Paging async iterator protocol is not available for ApplicationPaged
ERROR:cli.azure.cli.core.azclierror:Not Found({
"error": {
"code": "Request_ResourceNotFound",
"message": "Resource '' does not exist or one of its queried reference-property objects are not present.",
"innerError": {
"date": "2020-10-27T07:37:50",
"request-id": "",
"client-request-id": ""
}
}
})
Not Found({
"error": {
"code": "Request_ResourceNotFound",
"message": "Resource '' does not exist or one of its queried reference-property objects are not present.",
"innerError": {
"date": "2020-10-27T07:37:50",
"request-id": "",
"client-request-id": ""
}
}
})
Traceback (most recent call last):
File "deploy.py", line 792, in
main()
File "deploy.py", line 786, in main
state1
File "deploy.py", line 614, in update_registration
update_registration(self.application_name)
File "C:\Users\anslutsk\of_onefuzz\1_4_0_onefuzz_1_4_0\DEPLOY\register_pool_application.py", line 259, in update_registration
onefuzz_instance_name=application_name,
File "C:\Users\anslutsk\of_onefuzz\1_4_0_onefuzz_1_4_0\DEPLOY\register_pool_application.py", line 55, in register_application
app = create_application_registration(onefuzz_instance_name, registration_name)
File "C:\Users\anslutsk\of_onefuzz\1_4_0_onefuzz_1_4_0\DEPLOY\register_pool_application.py", line 149, in create_application_registration
json.dumps(body),
File "C:\Users\anslutsk\of_onefuzz\1_4_0_onefuzz_1_4_0\DEPLOY\register_pool_application.py", line 35, in az_cli
raise cli.result.error
File "C:\Program Files\Python37\lib\site-packages\knack\cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "C:\Program Files\Python37\lib\site-packages\azure\cli\core\commands_init_.py", line 654, in execute
raise ex
File "C:\Program Files\Python37\lib\site-packages\azure\cli\core\commands_init_.py", line 718, in run_jobs_serially
results.append(self.run_job(expanded_arg, cmd_copy))
File "C:\Program Files\Python37\lib\site-packages\azure\cli\core\commands_init
.py", line 711, in run_job
six.reraise(*sys.exc_info())
File "C:\Program Files\Python37\lib\site-packages\six.py", line 703, in reraise
raise value
File "C:\Program Files\Python37\lib\site-packages\azure\cli\core\commands_init
.py", line 688, in run_job
result = cmd_copy(params)
File "C:\Program Files\Python37\lib\site-packages\azure\cli\core\commands_init
.py", line 325, in call
return self.handler(*args, **kwargs)
File "C:\Program Files\Python37\lib\site-packages\azure\cli\core_init
.py", line 784, in default_command_handler
return op(**command_args)
File "C:\Program Files\Python37\lib\site-packages\azure\cli\command_modules\util\custom.py", line 17, in rest_call
skip_authorization_header, resource, output_file)
File "C:\Program Files\Python37\lib\site-packages\azure\cli\core\util.py", line 905, in send_raw_request
raise CLIError(reason)
knack.util.CLIError: Not Found({
"error": {
"code": "Request_ResourceNotFound",
"message": "Resource '' does not exist or one of its queried reference-property objects are not present.",
"innerError": {
"date": "2020-10-27T07:37:50",
"request-id": "",
"client-request-id": ""
}
}
})

@chkeita chkeita self-assigned this Oct 29, 2020
@chkeita
Copy link
Contributor

chkeita commented Oct 30, 2020

will be handled in #236

@chkeita chkeita linked a pull request Nov 2, 2020 that will close this issue
5 tasks
@chkeita
Copy link
Contributor

chkeita commented Nov 2, 2020

fixed in #236

@chkeita chkeita closed this as completed Nov 2, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants