'precise-updates/cloud-tools' is invalid for APT::Default-Release

Bug #1316174 reported by Patrick Hetu
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
juju-core
Won't Fix
Low
Unassigned

Bug Description

I got this error trying to bootstrap a local environment:

versions:
ii juju 1.19.1-0ubuntu1~12.04.1~juju1 next generation service orchestration system
ii juju-core 1.19.1-0ubuntu1~12.04.1~juju1 Juju is devops distilled - client
ii juju-deployer 0.3.4-0ubuntu1~precise1~ppa1 Deploy complex stacks of services using Juju
ii juju-local 1.19.1-0ubuntu1~12.04.1~juju1 dependency package for the Juju local provider

uploading tools for series [precise trusty]
Logging to /home/juju/local/cloud-init-output.log on remote host
Bootstrapping Juju machine agent
8b5954bd7ef8fe11b2f5330a517c7263382ada1ad92bcfbbdec449b402563719 /home/juju/local/tools/1.19.1.1-precise-amd64/tools.tar.gz
2014-05-05 14:45:34 INFO juju.cmd supercommand.go:301 running juju-1.19.1.1-precise-amd64 [gc]
2014-05-05 14:45:34 DEBUG juju.agent agent.go:375 read agent config, format "1.18"
2014-05-05 14:45:34 INFO juju.provider.local environprovider.go:40 opening environment "local"
2014-05-05 14:45:34 DEBUG juju.cmd.jujud bootstrap.go:161 starting mongo
2014-05-05 14:45:34 DEBUG juju.cmd.jujud bootstrap.go:182 calling ensureMongoServer
2014-05-05 14:45:34 INFO juju.agent.mongo mongo.go:153 Ensuring mongo server is running; data directory /home/juju/local; port 37017
2014-05-05 14:45:34 INFO juju.agent.mongo mongo.go:313 installing mongodb-server
2014-05-05 14:45:34 INFO juju.utils.apt apt.go:128 Running: [apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet install --target-release precise-updates/cloud-tools mongodb-server]
2014-05-05 14:45:34 ERROR juju.utils.apt apt.go:134 apt-get command failed: exit status 100
args: []string{"apt-get", "--option=Dpkg::Options::=--force-confold", "--option=Dpkg::options::=--force-unsafe-io", "--assume-yes", "--quiet", "install", "--target-release", "precise-updates/cloud-tools", "mongodb-server"}
Reading package lists...
E: The value 'precise-updates/cloud-tools' is invalid for APT::Default-Release as such a release is not available in the sources

2014-05-05 14:45:34 ERROR juju.cmd supercommand.go:304 cannot install mongod: apt-get failed: exit status 100
Bootstrap failed, destroying environment
ERROR exit status 1

Revision history for this message
Curtis Hovey (sinzui) wrote :

This error implies that cloud-init tried to install mongodb-server before cloud-tools was added to apt sources and update was called.

Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.19.2
Revision history for this message
Ian Booth (wallyworld) wrote :

When using a local environment, Juju does not alter the apt sources - these are expected to be correctly set up before running Juju. And cloud-tools is a required archive. So what we'll do is check that the archive is enabled and error early with a nice message if it isn't

Ian Booth (wallyworld)
Changed in juju-core:
milestone: 1.19.2 → next-stable
Revision history for this message
Brad Crittenden (bac) wrote :

Ian are you saying a user needs to do something besides installing juju-core and juju-local on precise?

I have installed those two packages and hit this error.

When you say "these are expected to be correctly set up before running Juju" do you mean by juju-local or by the user? If the latter what exactly should one do?

This looks like a juju-local deficiency to me.

Revision history for this message
Brad Crittenden (bac) wrote :

Had a conversation with Curtis yesterday and he was surprised to see this problem still affects precise with juju/stable added as a repo. The version of the juju-local package shown below was believed to work but, as shown, does not.

bac@ubuntu:~$ apt-cache madison juju-local
juju-local | 1.20.0-0ubuntu1~12.04.2~juju1 | http://ppa.launchpad.net/juju/stable/ubuntu/ precise/main amd64 Packages
 juju-core | 1.20.0-0ubuntu1~12.04.2~juju1 | http://ppa.launchpad.net/juju/stable/ubuntu/ precise/main Sources
bac@ubuntu:~$ juju bootstrap -e local
uploading tools for series [precise trusty]
Logging to /home/bac/.juju/local/cloud-init-output.log on remote host
Bootstrapping Juju machine agent
8fc71a716b415190c4f58910dded455d5968a85d136798fd2ced1d318f157ff8 /home/bac/.juju/local/tools/1.20.0.1-precise-amd64/tools.tar.gz
2014-07-07 13:29:03 INFO juju.cmd supercommand.go:37 running jujud [1.20.0.1-precise-amd64 gc]
2014-07-07 13:29:03 DEBUG juju.agent agent.go:376 read agent config, format "1.18"
2014-07-07 13:29:03 INFO juju.provider.local environprovider.go:42 opening environment "local"
2014-07-07 13:29:03 DEBUG juju.cmd.jujud bootstrap.go:163 starting mongo
2014-07-07 13:29:03 DEBUG juju.cmd.jujud bootstrap.go:188 calling ensureMongoServer
2014-07-07 13:29:03 INFO juju.mongo mongo.go:147 Ensuring mongo server is running; data directory /home/bac/.juju/local; port 37017
2014-07-07 13:29:03 INFO juju.mongo mongo.go:287 installing mongodb-server
2014-07-07 13:29:03 INFO juju.utils.apt apt.go:128 Running: [apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet install --target-release precise-updates/cloud-tools mongodb-server]
2014-07-07 13:29:03 ERROR juju.utils.apt apt.go:134 apt-get command failed: exit status 100
args: []string{"apt-get", "--option=Dpkg::Options::=--force-confold", "--option=Dpkg::options::=--force-unsafe-io", "--assume-yes", "--quiet", "install", "--target-release", "precise-updates/cloud-tools", "mongodb-server"}
Reading package lists...
E: The value 'precise-updates/cloud-tools' is invalid for APT::Default-Release as such a release is not available in the sources

2014-07-07 13:29:03 ERROR juju.cmd supercommand.go:323 cannot install mongod: apt-get failed: exit status 100
Bootstrap failed, destroying environment
ERROR exit status 1

Ian Booth (wallyworld)
Changed in juju-core:
milestone: next-stable → 1.21-alpha1
Revision history for this message
Ryan Beisner (1chb1n) wrote :

FYI re: 1.20.1 on 12.04.5:

$ apt-cache madison juju-local
juju-local | 1.20.1-0ubuntu1~12.04.1~juju1 | http://ppa.launchpad.net/juju/stable/ubuntu/ precise/main amd64 Packages
juju-core | 1.20.1-0ubuntu1~12.04.1~juju1 | http://ppa.launchpad.net/juju/stable/ubuntu/ precise/main Sources

$ dpkg -l | grep "juju-"
ii juju-core 1.20.1-0ubuntu1~12.04.1~juju1 Juju is devops distilled - client
ii juju-local 1.20.1-0ubuntu1~12.04.1~juju1 dependency package for the Juju local provider

$ lsb_release -d
Description: Ubuntu 12.04.5 LTS

$ uname -rv
3.13.0-32-generic #57~precise1-Ubuntu SMP Tue Jul 15 03:51:20 UTC 2014

$ juju bootstrap -e local
uploading tools for series [precise trusty]
Logging to /home/rbeisner/.juju/local/cloud-init-output.log on remote host
Bootstrapping Juju machine agent
5b16f90b366acdddb1ac7cdfe64016bacce6a157473fe2796e48c1041827491c /home/rbeisner/.juju/local/tools/1.20.1.1-precise-amd64/tools.tar.gz
2014-08-11 15:55:13 INFO juju.cmd supercommand.go:37 running jujud [1.20.1.1-precise-amd64 gc]
2014-08-11 15:55:13 DEBUG juju.agent agent.go:377 read agent config, format "1.18"
2014-08-11 15:55:13 INFO juju.provider.local environprovider.go:42 opening environment "local"
2014-08-11 15:55:13 DEBUG juju.cmd.jujud bootstrap.go:191 starting mongo
2014-08-11 15:55:13 DEBUG juju.cmd.jujud bootstrap.go:216 calling ensureMongoServer
2014-08-11 15:55:13 INFO juju.mongo mongo.go:169 Ensuring mongo server is running; data directory /home/rbeisner/.juju/local; port 37017
2014-08-11 15:55:13 INFO juju.mongo mongo.go:317 installing mongodb-server
2014-08-11 15:55:13 INFO juju.utils.apt apt.go:128 Running: [apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet install --target-release precise-updates/cloud-tools mongodb-server]
2014-08-11 15:55:13 ERROR juju.utils.apt apt.go:134 apt-get command failed: exit status 100
args: []string{"apt-get", "--option=Dpkg::Options::=--force-confold", "--option=Dpkg::options::=--force-unsafe-io", "--assume-yes", "--quiet", "install", "--target-release", "precise-updates/cloud-tools", "mongodb-server"}
Reading package lists...
E: The value 'precise-updates/cloud-tools' is invalid for APT::Default-Release as such a release is not available in the sources

2014-08-11 15:55:13 ERROR juju.cmd supercommand.go:323 cannot install mongod: apt-get failed: exit status 100
Bootstrap failed, destroying environment
ERROR exit status 1

Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.21-alpha1 → 1.21-alpha2
Revision history for this message
Andrew Wilkins (axwalk) wrote :

Is it possible to have the juju-local package add the source? The source needs to be pinned lower (we currently pin it at priority 400 in Juju deployments), so we don't mess with the user's day-to-day package management.

Revision history for this message
Curtis Hovey (sinzui) wrote :

The juju-local package is currently a meta-package requires the juju deps.

I think it is possible for the the package to have install the cloud-tools archive, but it is very unorthodox for a package to install a source. We'll need to discuss with with Ubuntu.

Curtis Hovey (sinzui)
tags: added: local-provider
tags: added: precise
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.21-alpha2 → 1.21-alpha3
Curtis Hovey (sinzui)
Changed in juju-core:
importance: High → Medium
milestone: 1.21-alpha3 → none
Revision history for this message
Merlijn Sebrechts (merlijn-sebrechts) wrote :

any update? Is there a workaround for this?

Revision history for this message
Curtis Hovey (sinzui) wrote :

On the precise host create this file to ensure the archive is pinned to a lower priority:
    /etc/apt/preferences.d/cloud-tools
with this content:
Package: *
Pin: release n=precise-updates/cloud-tools
Pin-Priority: 400

Now add repository.
    sudo add-apt-repository cloud-archive:tools
    sudo apt-get update

Revision history for this message
David Lawson (deej) wrote :

This isn't limited to the local provider, we just encountered it with an upgrade of the openstack provier from 1.18 to 1.22.8.

Log data is available here: https://pastebin.canonical.com/141527/

After that point in the log, the last four lines just kept looping as juju attempted to to install the mongo update, failed and restarted the API server three seconds later and tried again. Installing the cloud-tools repository by hand, as below, after logging into the bootstrap node worked around the problem.

sudo add-apt-repository cloud-archive:tools
sudo apt-get update

Curtis Hovey (sinzui)
Changed in juju-core:
importance: Medium → Low
Changed in juju-core:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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