Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

Remove expensive cloud check on unshelve #686

Merged
merged 4 commits into from
Oct 2, 2018

Conversation

cdosborn
Copy link
Contributor

@cdosborn cdosborn commented Sep 28, 2018

Description

Problem

Unshelving on IU would return nginx gateway timeout error

Solution

Remove unnecessary cloud check

This check queries all the instances in the cloud. It blocks requests to unshelve. If the query takes 30 sec, then the request to unshelve takes at least 30 sec.

On IU, the query takes a minute. This is way too long for a single api request. If 24 people tried to unshelve the entire app would be hung. nginx was timing out for unshelving instances on IU because of how long this took, with a Gateway Timeout Error.

Checklist before merging Pull Requests

  • Add an entry in the changelog
  • Reviewed and approved by at least one other contributor.

@cdosborn cdosborn self-assigned this Sep 28, 2018
Copy link
Contributor

@calvinmclean calvinmclean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My PR is failing the same thing in Travis. Looks like something was missed by the formatting in master

hypervisor_stats = admin_driver._connection.ex_detail_hypervisor_node(
hypervisor_hostname
)
return test_capacity(hypervisor_hostname, instance, hypervisor_stats)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this method (test_capacity) is used anywhere except here and can probably be removed also

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally this would be caught by the vulture but currently it is too muted rn to be useful :(

This check queries all the instances in the cloud. It blocks requests to
unshelve. If the query takes 30 sec, then the request to unshelve takes at
least 30 sec.

On IU, the query takes a minute. This is way too long for a single api
request. If 24 people tried to unshelve the entire app would be hung. nginx
was timing out for unshelving instances on IU because of how long this took,
with a Gateway Timeout Error.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 38.04% when pulling b195fc9 on cdosborn:fix-slow-unshelve into c8d8d3c on cyverse:master.

@cdosborn cdosborn merged commit 6966093 into cyverse:master Oct 2, 2018
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 this pull request may close these issues.

3 participants