Comment 1 for bug 1633593

Revision history for this message
Mario Splivalo (mariosplivalo) wrote :

I can confirm this.

I installed trusty, added juju stable ppa, and installed latest 1.25 from the ppa. This is the situation most of the long-time juju users will be at.
After doing dist-upgrade /usr/bin/juju points to juju2, rendering existing juju1 deployment inaccessible.

To remedy this one needs to run 'dpkg-reconfigure juju-core'.

Here is the shortlog:

ubuntu@jujutest:~$ apt-cache policy juju
juju:
  Installed: 1.25.6-0ubuntu1~14.04.1~juju1
  Candidate: 1:2.0.0-0ubuntu1~14.04.2~juju1
  Version table:
     1:2.0.0-0ubuntu1~14.04.2~juju1 0
        500 http://ppa.launchpad.net/juju/stable/ubuntu/ trusty/main amd64 Packages
     1.25.6-0ubuntu1.14.04.1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
 *** 1.25.6-0ubuntu1~14.04.1~juju1 0
        500 http://ppa.launchpad.net/juju/stable/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     1.18.1-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
ubuntu@jujutest:~$ which juju
/usr/bin/juju
ubuntu@jujutest:~$ ls -al /usr/bin/juju
lrwxrwxrwx 1 root root 22 Oct 14 20:35 /usr/bin/juju -> /etc/alternatives/juju

After the 'apt-get dist-upgrade':

ubuntu@jujutest:~$ apt-cache policy juju
juju:
  Installed: 1:2.0.0-0ubuntu1~14.04.2~juju1
  Candidate: 1:2.0.0-0ubuntu1~14.04.2~juju1
  Version table:
 *** 1:2.0.0-0ubuntu1~14.04.2~juju1 0
        500 http://ppa.launchpad.net/juju/stable/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     1.25.6-0ubuntu1.14.04.1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
     1.25.6-0ubuntu1~14.04.1~juju1 0
        500 http://ppa.launchpad.net/juju/stable/ubuntu/ trusty/main amd64 Packages
     1.18.1-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
ubuntu@jujutest:~$ ls -al /usr/bin/juju
lrwxrwxrwx 1 root root 24 Oct 13 23:59 /usr/bin/juju -> ../lib/juju-2.0/bin/juju

Then the fix:

ubuntu@jujutest:~$ sudo dpkg-reconfigure juju-core
update-alternatives: using /usr/lib/juju-1.25.6/bin/juju to provide /usr/bin/juju (juju) in auto mode
ubuntu@jujutest:~$ ls -al /usr/bin/juju
lrwxrwxrwx 1 root root 22 Oct 14 20:42 /usr/bin/juju -> /etc/alternatives/juju
ubuntu@jujutest:~$ juju --version
1.25.6-trusty-amd64
ubuntu@jujutest:~$