New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update rename wiki script with "good version" #3814
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no c5 anymore since migration and we should not use /home/reception in puppetized script should use the current users puppet
|
bff89d0
to
7dad190
Compare
- removed c5 - improved logging - stopped hardcoding reception's homedir - catch an error --------- Co-authored-by: Reception123 <utilizator.receptie123@gmail.com>
@@ -9,6 +12,7 @@ class DbClusterMap(TypedDict): | |||
c2: str | |||
c3: str | |||
c4: str | |||
c5: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still no c5 CC @RhinosF1
@@ -21,10 +25,10 @@ class DbClusterMap(TypedDict): | |||
|
|||
|
|||
def generate_salt_command(cluster: str, command: str) -> str: | |||
return f'salt-ssh -E "{cluster}*" cmd.run "{command}"' | |||
return f'salt-ssh -E "{cluster}" cmd.run "{command}"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC we don't need -E if we aren't using * but isn't * required if the full hostname is IE db151.wikitide.net? I can't remember if salt uses that or just db151 though
|
||
# Step 3: Execute MediaWiki rename script | ||
execute_salt_command(salt_command=generate_salt_command('mwtask181', f'sudo -u www-data php /srv/mediawiki/1.41/extensions/CreateWiki/maintenance/renameWiki.php --wiki=loginwiki --rename {oldwiki_db} {newwiki_db} $user')) | ||
execute_salt_command(salt_command=generate_salt_command('mwtask181', f'mwscript extensions/CreateWiki/renameWiki.php loginwiki --no-log --rename {oldwiki_db} {newwiki_db} {os.getlogin()}')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think mwtask181 should be some sort of constant so it is easy to change if task server is changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that makes sense, how exactly would I do that here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to
DEPLOYUSER = 'www-data' |
No description provided.