diff --git a/src/charm.py b/src/charm.py index 9ace9cc..2352fa1 100755 --- a/src/charm.py +++ b/src/charm.py @@ -421,6 +421,11 @@ class CephISCSIGatewayCharmBase( self.adapters) logging.info("Rendering config") _render_configs() + # Make sure the gateway services are enabled after rendering the + # configurations and starting those. Those are disabled by + # default in the package. LP: #2045828 + for service_name in self.GW_SERVICES: + ch_host.service_enable(service_name) logging.info("Setting started state") self.peers.announce_ready() self._stored.is_started = True diff --git a/unit_tests/test_ceph_iscsi_charm.py b/unit_tests/test_ceph_iscsi_charm.py index f4d6c3a..588c71f 100644 --- a/unit_tests/test_ceph_iscsi_charm.py +++ b/unit_tests/test_ceph_iscsi_charm.py @@ -137,6 +137,7 @@ class _CephISCSIGatewayCharmBase(charm.CephISCSIGatewayCharmBase): class TestCephISCSIGatewayCharmBase(CharmTestCase): PATCHES = [ + 'ch_host', 'ch_templating', 'gwcli_client', 'os',