Juju corrupts jenv yaml on upgrade

Bug #1348827 reported by Curtis Hovey
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Triaged
Critical
Unassigned

Bug Description

Upgrade tests for every substrate are failing because the jenv file's yaml is overwritten without first being truncated. Many times the upgrade works, but juju destroy-environment fails:
    juju --show-log destroy-environment local-upgrade-trusty-amd64 --force -y
    2014-07-24 23:13:21 INFO juju.cmd supercommand.go:37 running juju [1.20.1-trusty-amd64 gc]
    2014-07-24 23:13:21 ERROR juju.cmd supercommand.go:323 cannot read environment info for "local-upgrade-trusty-amd64":
        error unmarshalling "/var/lib/jenkins/cloud-city/environments/local-upgrade-trusty-amd64.jenv":
        YAML error: line 139: could not find expected

Here is an example of a corrupted jenv https://pastebin.canonical.com/114224/
the last two lines are from the prevous content of the file, probably tools-url:
  tools-metadata-url: http://juju-dist.s3.amazonaws.com/testing/tools
  tools-url: http://juju-dist.s3.amazonaws.com/testing/tools
  type: ec2
zonaws.com/testing/tools
  type: ec2

Once a corrupted jenv is left behind, the env cannot be bootstrapped again without the wit to purge the trash left by juju.

This issue is more likely to happen in local lxc tests, but has been seen in aws, hp, canonistack, and azure.

Curtis Hovey (sinzui)
Changed in juju-core:
milestone: none → 1.21-alpha1
Revision history for this message
Dave Cheney (dave-cheney) wrote : Re: [Bug 1348827] [NEW] Juju corrupts jenv yaml on upgrade
Download full text (3.3 KiB)

Fixed in trunk [1] for https://bugs.launchpad.net/juju-core/+bug/1348458

1. https://github.com/juju/juju/pull/402

On Sat, Jul 26, 2014 at 8:12 AM, Curtis Hovey <email address hidden> wrote:
> Public bug reported:
>
> Upgrade tests for every substrate are failing because the jenv file's yaml is overwritten without first being truncated. Many times the upgrade works, but juju destroy-environment fails:
> juju --show-log destroy-environment local-upgrade-trusty-amd64 --force -y
> 2014-07-24 23:13:21 INFO juju.cmd supercommand.go:37 running juju [1.20.1-trusty-amd64 gc]
> 2014-07-24 23:13:21 ERROR juju.cmd supercommand.go:323 cannot read environment info for "local-upgrade-trusty-amd64":
> error unmarshalling "/var/lib/jenkins/cloud-city/environments/local-upgrade-trusty-amd64.jenv":
> YAML error: line 139: could not find expected
>
> Here is an example of a corrupted jenv https://pastebin.canonical.com/114224/
> the last two lines are from the prevous content of the file, probably tools-url:
> tools-metadata-url: http://juju-dist.s3.amazonaws.com/testing/tools
> tools-url: http://juju-dist.s3.amazonaws.com/testing/tools
> type: ec2
> zonaws.com/testing/tools
> type: ec2
>
> Once a corrupted jenv is left behind, the env cannot be bootstrapped
> again without the wit to purge the trash left by juju.
>
> This issue is more likely to happen in local lxc tests, but has been
> seen in aws, hp, canonistack, and azure.
>
> ** Affects: juju-core
> Importance: Critical
> Status: Triaged
>
>
> ** Tags: ci config regression
>
> ** Changed in: juju-core
> Milestone: None => 1.21-alpha1
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> Matching subscriptions: MOAR JUJU SPAM!
> https://bugs.launchpad.net/bugs/1348827
>
> Title:
> Juju corrupts jenv yaml on upgrade
>
> Status in juju-core:
> Triaged
>
> Bug description:
> Upgrade tests for every substrate are failing because the jenv file's yaml is overwritten without first being truncated. Many times the upgrade works, but juju destroy-environment fails:
> juju --show-log destroy-environment local-upgrade-trusty-amd64 --force -y
> 2014-07-24 23:13:21 INFO juju.cmd supercommand.go:37 running juju [1.20.1-trusty-amd64 gc]
> 2014-07-24 23:13:21 ERROR juju.cmd supercommand.go:323 cannot read environment info for "local-upgrade-trusty-amd64":
> error unmarshalling "/var/lib/jenkins/cloud-city/environments/local-upgrade-trusty-amd64.jenv":
> YAML error: line 139: could not find expected
>
> Here is an example of a corrupted jenv https://pastebin.canonical.com/114224/
> the last two lines are from the prevous content of the file, probably tools-url:
> tools-metadata-url: http://juju-dist.s3.amazonaws.com/testing/tools
> tools-url: http://juju-dist.s3.amazonaws.com/testing/tools
> type: ec2
> zonaws.com/testing/tools
> type: ec2
>
> Once a corrupted jenv is left behind, the env cannot be bootstrapped
> again without the wit to purge the trash left by juju.
>
> This issue is more likely to happen in local lxc tests, but has been
> seen in aws, hp, cano...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.