Volans has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/395709 )

Change subject: wmf-auto-reimage: fix bug in repool message
......................................................................

wmf-auto-reimage: fix bug in repool message

* When the support for renaming hosts during reimages was added, a new
  bug was introduced in the printing of the repool message to execute at
  the end. wmf-auto-reimage never repool a host, it just print the
  command to execute to the user.
* Slightly improved the message in case of rename, specifying that the
  new name is used in the command.

Change-Id: I2737d2cb4c370182c3ee669cfafffbd71d90415a
---
M modules/profile/files/cumin/wmf_auto_reimage_lib.py
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/09/395709/1

diff --git a/modules/profile/files/cumin/wmf_auto_reimage_lib.py 
b/modules/profile/files/cumin/wmf_auto_reimage_lib.py
index d9f030e..30da646 100644
--- a/modules/profile/files/cumin/wmf_auto_reimage_lib.py
+++ b/modules/profile/files/cumin/wmf_auto_reimage_lib.py
@@ -823,13 +823,16 @@
             for key, value in tags.iteritems():
                 if is_rename and value == rename_from:
                     value = rename_to
-                items.append('='.join(key, value))
+                items.append('='.join((key, value)))
 
             selector = ','.join(items)
             commands.append(base_command.format(tags=selector, state=state))
 
-    message = ('To set back the conftool status to their previous values 
run:\n'
-               '```\n{repool}\n```').format(repool='\n'.join(commands))
+    rename = ''
+    if is_rename:
+        rename = ' (with the new hostname)'
+    message = ('To set back the conftool status to their previous 
values{rename} run:\n'
+               '{repool}').format(rename=rename, repool='\n'.join(commands))
 
     print_line(message)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/395709
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2737d2cb4c370182c3ee669cfafffbd71d90415a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Volans <rcocci...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to