2

When i run bootstrap in How do I configure juju for local usage? i got this error. I have done the same steps. So why that error is comming? Then i checked the permission for index.json file i changed permission but it didn't work.

ERROR failed getting all instances: error executing "lxc-ls": Traceback (most recent call last):;   File "/usr/bin/lxc-ls", line 31, in <module>;     import lxc;   File "/usr/lib/python3/dist-packages/lxc/__init__.py", line 26, in <module>;     import _lxc; ImportError: /usr/lib/x86_64-linux-gnu/liblxc.so.1: undefined symbol: cgmanager_get_pid_cgroup_abs_sync
ERROR error executing "lxc-ls": Traceback (most recent call last):;   File "/usr/bin/lxc-ls", line 31, in <module>;     import lxc;   File "/usr/lib/python3/dist-packages/lxc/__init__.py", line 26, in <module>;     import _lxc; ImportError: /usr/lib/x86_64-linux-gnu/liblxc.so.1: undefined symbol: cgmanager_get_pid_cgroup_abs_sync
ERROR Bootstrap failed, and the environment could not be destroyed: exit status 1
ERROR rename /home/sajith/.juju/local/storage/.tmp/juju-filestorage-670557739 /home/sajith/.juju/local/storage/tools/streams/v1/index.json: permission denied

These are the steps I followed:

sudo add-apt-repository ppa:juju/stable
sudo apt-get update
sudo apt-get install juju-core
sudo apt-get install juju-local
ssh-keygen -t rsa
juju init
juju switch local
juju bootstrap

ERROR error executing "lxc-ls": Traceback (most recent call last):; File "/usr/bin/lxc-ls", line 31, in <module>; import lxc; File "/usr/lib/python3/dist-packages/lxc/__init__.py", line 26, in <module>; import _lxc; ImportError: /usr/lib/x86_64-linux-gnu/liblxc.so.1: undefined symbol: cgmanager_get_pid_cgroup_abs_sync
muru
  • 207,228

2 Answers2

3

I was having exactly the same problem on a clean install I did of trusty this morning. I had to do an upgrade. I was getting the undefined symbol: cgmanager_get_pid_cgroup_abs_sync error when running lxc-ls as well.

sudo apt-get upgrade

That fixed the issue for me

MattyW
  • 313
2

Read more about bootstrapping:
> Configuring for LXC
> Bootstrapping and Destroying

Some cite:

The usage of LXC Linux Containers requires root privileges for some steps. Juju will prompt for your password if needed. Juju cannot be run under sudo because it needs to manage permission as the real user.

Other way to solve problem:

  1. Try:

    sudo rm ~/.juju/environments/local.jenv  
    

    and then reconfigure or reinstall from PPA's steps or SSH key generation.

  2. To remove all current deployments and clear up everything in your cloud, you can run the command:

    juju destroy-environment  <environment-name>
    

    Where the <environment-name> is the name you gave the environment when you configured it. This extra details is to help prevent accidents! You will also see a warning and will be prompted whether or not to continue - this action will remove everything, including the bootstrap node. Warning!

  3. Also with WARNING! this command will destroy the "local" environment (type: local)
    This includes all machines, services, data and other resources.

    juju destroy-environment local --force
    
  4. And again with WARNING!
    To log your LXC destroy (to view LXC trouble and post your log):

    juju destroy-environment local --logging-config=golxc=TRACE;juju=DEBUG --show-log
    
swift
  • 3,291