Do not install NTP when installed in a container
Check if the charm is installed inside a container and do not install NTP if that is the case. Partial-Bug: #1690513 Change-Id: Ib290733a175197dee1261043a1e8ff2edc0b53e5
This commit is contained in:
parent
fd401d5b95
commit
858ce946bb
|
@ -40,7 +40,10 @@ from charmhelpers.fetch import (
|
||||||
filter_installed_packages,
|
filter_installed_packages,
|
||||||
)
|
)
|
||||||
from charmhelpers.payload.execd import execd_preinstall
|
from charmhelpers.payload.execd import execd_preinstall
|
||||||
from charmhelpers.core.host import cmp_pkgrevno
|
from charmhelpers.core.host import (
|
||||||
|
cmp_pkgrevno,
|
||||||
|
is_container,
|
||||||
|
)
|
||||||
from charmhelpers.contrib.network.ip import (
|
from charmhelpers.contrib.network.ip import (
|
||||||
get_relation_ip,
|
get_relation_ip,
|
||||||
get_iface_for_address,
|
get_iface_for_address,
|
||||||
|
@ -103,6 +106,8 @@ APACHE_PACKAGES = [
|
||||||
def install_packages():
|
def install_packages():
|
||||||
add_source(config('source'), config('key'))
|
add_source(config('source'), config('key'))
|
||||||
apt_update(fatal=True)
|
apt_update(fatal=True)
|
||||||
|
if is_container():
|
||||||
|
PACKAGES.remove('ntp')
|
||||||
pkgs = filter_installed_packages(PACKAGES)
|
pkgs = filter_installed_packages(PACKAGES)
|
||||||
if pkgs:
|
if pkgs:
|
||||||
status_set('maintenance', 'Installing radosgw packages')
|
status_set('maintenance', 'Installing radosgw packages')
|
||||||
|
|
Loading…
Reference in New Issue