bigdata-dev team mailing list archive
-
bigdata-dev team
-
Mailing list archive
-
Message #00175
[Merge] lp:~bigdata-dev/charms/trusty/apache-hadoop-hdfs-secondary/status-removed into lp:~bigdata-dev/charms/trusty/apache-hadoop-hdfs-secondary/trunk
Cory Johns has proposed merging lp:~bigdata-dev/charms/trusty/apache-hadoop-hdfs-secondary/status-removed into lp:~bigdata-dev/charms/trusty/apache-hadoop-hdfs-secondary/trunk.
Requested reviews:
Juju Big Data Development (bigdata-dev)
For more details, see:
https://code.launchpad.net/~bigdata-dev/charms/trusty/apache-hadoop-hdfs-secondary/status-removed/+merge/267596
Fixed status reporting not being accurate when relations were removed
--
Your team Juju Big Data Development is requested to review the proposed merge of lp:~bigdata-dev/charms/trusty/apache-hadoop-hdfs-secondary/status-removed into lp:~bigdata-dev/charms/trusty/apache-hadoop-hdfs-secondary/trunk.
=== modified file 'hooks/callbacks.py'
--- hooks/callbacks.py 2015-06-24 22:13:14 +0000
+++ hooks/callbacks.py 2015-08-10 23:06:30 +0000
@@ -40,3 +40,7 @@
def update_active_status():
unitdata.kv().set('charm.active', True)
hookenv.status_set('active', 'Ready')
+
+
+def clear_active_flag():
+ unitdata.kv().set('charm.active', False)
=== modified file 'hooks/common.py'
--- hooks/common.py 2015-06-24 22:13:14 +0000
+++ hooks/common.py 2015-08-10 23:06:30 +0000
@@ -88,8 +88,10 @@
callbacks.update_active_status,
],
'cleanup': [
+ callbacks.clear_active_flag,
charmframework.helpers.close_ports(dist_config.exposed_ports('secondary-namenode')),
hdfs.stop_secondarynamenode,
+ callbacks.update_blocked_status,
],
},
])
=== added file 'hooks/secondary-relation-departed'
--- hooks/secondary-relation-departed 1970-01-01 00:00:00 +0000
+++ hooks/secondary-relation-departed 2015-08-10 23:06:30 +0000
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+All hooks in this charm are managed by the Charm Framework.
+The framework helps manage dependencies and preconditions to ensure that
+steps are only executed when they can be successful. As such, no additional
+code should be added to this hook; instead, please integrate new functionality
+into the 'callbacks' list in hooks/common.py. New callbacks can be placed
+in hooks/callbacks.py, if necessary.
+
+See http://big-data-charm-helpers.readthedocs.org/en/latest/examples/framework.html
+for more information.
+"""
+import common
+common.manage()
Follow ups