Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
provider/azure: create common resources once only #6826
Conversation
|
Note to reviewers: please review only the second commit. The first one has its own PR (#6818) |
|
QA
|
| + env.mu.Lock() | ||
| + storageAccountType := env.config.storageAccountType | ||
| + env.mu.Unlock() | ||
| + return env.createCommonResourceDeployment( |
wallyworld
Jan 19, 2017
Owner
Do we need to exit early if the resource exists?
Or is the api idempotent?
| +} | ||
| + | ||
| +func isControllerEnviron(env *azureEnviron) (bool, error) { | ||
| + if env.envName != "controller" { |
wallyworld
Jan 19, 2017
Owner
I realise not having this short circuit makes it slower, but is it worth the person who renames "controller" not knowing this is here. I think we have a const for controller model. Let's at least use that.
wallyworld
approved these changes
Jan 19, 2017
I wonder if it's worth polling using the azure console and refresh button to ensure the common resource is finished being created before any new machine comes up. Or a unit test to that effect
axw
added some commits
Jan 16, 2017
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
axw commentedJan 18, 2017
•
Edited 1 time
-
axw
Jan 18, 2017
Create common resources (storage account, vnet, nsg)
once only, when creating the model. For bootstrap,
we do this along with the bootstrap machine as we
already did. For non-controller models, we create
a deployment for the common resources at model
creation time. Because deployments can take a while,
and model creation is synchronous, we do the common
resource creation asynchronously and wait for its
completion before starting any machines.
There is an Environ upgrade step added that creates
a common resource deployment in non-controller
models. The upgrade step will preserve application-
specific network security rules.
Requires #6818
Fixes https://bugs.launchpad.net/juju/+bug/1656723