~axwalk/juju-core/lp1239550-check-jenv-consistency

Viewing all changes in revision 1995.

  • Committer: Andrew Wilkins
  • Date: 2013-10-18 03:39:49 UTC
  • Revision ID: andrew.wilkins@canonical.com-20131018033949-rjrdmgj249u4oork
environs: warn if .jenv/env.yaml are inconsistent

Changes in environments.yaml do not take effect
for an environment that has already been prepared.
In some cases, it might not be obvious to a user
that the environment is prepared, and that changes
will not take effect. e.g.:
 - User called sync-tools, then modified env.yaml,
   then bootstrapped.
 - User bootstrapped, bootstrap failed, then modified
   env.yaml and tried again. We could remove the
   .jenv file on failure, but we can't guarantee
   juju won't die before doing so.
 - User is bootstrapping the null provider; since
   destroy-environment is not implemented, the user
   must remove the .jenv file manually. It's easy to
   forget to do that.

We now log a warning if any values have been
changed in environments.yaml after preparing,
and provide some direction on what to do.

Also: don't call Prepare for config retrieved from
the config store (i.e. already prepared config).

Fixes #1239550

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: