Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazily create storage registry in client storage facade #13027

Merged
merged 1 commit into from
May 27, 2021

Conversation

wallyworld
Copy link
Member

The client storage facade was creating the storage pool manager and registry in the constructor. These objects need an instantiated provider instance to work. However, creating a provider instance hits the cloud provider apis. Running status therefore was impacted by these cloud api calls.

This PR only creates the storage pool manager and registry for those facade calls that need them, eg creating a storage pool. The read only apis used by status now no longer hit the cloud apis.

QA steps

Regression test storage behaviour.
bootstrap lxd
juju create-storage-pool test tmpfs foo=bar
juju storage-pools
juju storage-pools --name=lxd
juju storage-pools --provider=tmpfs
juju deploy postgresql --storage pgdata=lxd
juju status --storage

Bug reference

https://bugs.launchpad.net/juju/+bug/1908102

@wallyworld
Copy link
Member Author

Copy link
Member

@ycliuhw ycliuhw left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@wallyworld
Copy link
Member Author

$$merge$$

@jujubot jujubot merged commit e329a7a into juju:2.8 May 27, 2021
@wallyworld wallyworld mentioned this pull request May 27, 2021
jujubot added a commit that referenced this pull request May 27, 2021
#13028

Merge 2.8

#13026 Move all time consuming steps to timeout block;
#13027 Lazily create storage registry in client storage facade

```
# Conflicts:
# apiserver/facades/client/storage/base_test.go
```

## QA steps

See PRs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants