juju-solutions / bigtop

Mirror of Apache Bigtop
Apache License 2.0
0 stars 2 forks source link

plugin missing apt module #35

Closed kwmonroe closed 8 years ago

kwmonroe commented 8 years ago

hadoop-plugin is a subordinate that includes layer-apt. layer-apt now calls clear_removed_package_states, which requires importing apt.apt_pkg:

https://git.launchpad.net/layer-apt/commit/?id=625d18edfbba37210adf9e0f198b7be4bbd7e1d8

The apt module is available as a system-site package because python-apt is installed. hadoop-plugin does not include system site packages, so it can't find the apt module:

http://paste.ubuntu.com/21799021/

It would be nice if the apt layer fixed this, but i'm not sure it's possible. I thought maybe the apt layer could simply include python-apt in a wheelhouse.txt, but it's not that simple:

http://paste.ubuntu.com/21799623/

As a workaround, we can force the plugin to use system deps with the include_system_packages: true layer option.

kwmonroe commented 8 years ago

https://jujucharms.com/u/bigdata-dev/hadoop-plugin/trusty/6 contains the include_system_packages: true layer option.

kwmonroe commented 8 years ago

Stub fixed this in layer-apt. It was charmhelpers.fetch that was invoking apt.foo. Instead of relying on that, he now uses subprocess with dpkg:

https://git.launchpad.net/layer-apt/commit/?id=eb5a6cab977a2e4d7f10ebe95ec333f6cd2b009e

We can therefore remove the include_system_packages: true here and return to normal.

kwmonroe commented 8 years ago

Closing.. ~bigdata-dev/hadoop-plugin/trusty/7 reverts the include_system_packages: true.