bigdata-dev team mailing list archive
-
bigdata-dev team
-
Mailing list archive
-
Message #00173
[Merge] lp:~bigdata-dev/charms/trusty/apache-hadoop-yarn-master/status-removed into lp:~bigdata-dev/charms/trusty/apache-hadoop-yarn-master/trunk
Cory Johns has proposed merging lp:~bigdata-dev/charms/trusty/apache-hadoop-yarn-master/status-removed into lp:~bigdata-dev/charms/trusty/apache-hadoop-yarn-master/trunk.
Requested reviews:
Juju Big Data Development (bigdata-dev)
For more details, see:
https://code.launchpad.net/~bigdata-dev/charms/trusty/apache-hadoop-yarn-master/status-removed/+merge/267594
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-yarn-master/status-removed into lp:~bigdata-dev/charms/trusty/apache-hadoop-yarn-master/trunk.
=== modified file 'hooks/callbacks.py'
--- hooks/callbacks.py 2015-06-25 15:35:47 +0000
+++ hooks/callbacks.py 2015-08-10 23:05:59 +0000
@@ -46,3 +46,7 @@
hookenv.status_set('waiting', 'Waiting for compute slaves to provide NodeManagers')
else:
hookenv.status_set('blocked', 'Waiting for relation to compute slaves')
+
+
+def clear_active_flag():
+ unitdata.kv().set('charm.active', False)
=== modified file 'hooks/common.py'
--- hooks/common.py 2015-08-06 19:51:45 +0000
+++ hooks/common.py 2015-08-10 23:05:59 +0000
@@ -109,9 +109,11 @@
callbacks.update_active_status,
],
'cleanup': [
+ callbacks.clear_active_flag,
charmframework.helpers.close_ports(dist_config.exposed_ports('yarn-master')),
yarn.stop_resourcemanager,
yarn.stop_jobhistory,
+ callbacks.update_blocked_status,
],
},
])
=== added file 'hooks/namenode-relation-departed'
--- hooks/namenode-relation-departed 1970-01-01 00:00:00 +0000
+++ hooks/namenode-relation-departed 2015-08-10 23:05:59 +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()
=== added file 'hooks/nodemanager-relation-departed'
--- hooks/nodemanager-relation-departed 1970-01-01 00:00:00 +0000
+++ hooks/nodemanager-relation-departed 2015-08-10 23:05:59 +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()
=== added file 'hooks/resourcemanager-relation-departed'
--- hooks/resourcemanager-relation-departed 1970-01-01 00:00:00 +0000
+++ hooks/resourcemanager-relation-departed 2015-08-10 23:05:59 +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