Modify pash.py on hgssh to support a pushlog command

RESOLVED FIXED

Status

RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: bkero, Assigned: bkero)

Tracking

Details

(Assignee)

Description

5 years ago
As a requirement for migrations hg to local disk, a 'pushlog' command must be added to the pash.py script which serves SSH access of hg.mozilla.org. The diff follows:

    --- a/hg_helper.py
    +++ b/hg_helper.py
    @@ -318,6 +318,12 @@ def serve (cname):
                 else:
                     sys.stderr.write ('edit usage: ssh hg.mozilla.org edit [userrepo delete] - WARNING: will not prompt!
    ')
                     sys.exit (1)
    +    elif ssh_command.startswith ('pushlog ') and (cname != 'hg.ecmascript.org'):
    +        args = ssh_command.replace ('pushlog', '').split()
    +        if check_repo_name (args[0]):
    +            fh = open("%s/%s/.hg/pushlog2.db" % (doc_root[cname], args[0]))
    +            print(fh.read())
    +            fh.close()
         else:
             sys.stderr.write ('No interactive commands allowed here!
    ')
             sys.exit (1) 

The change was tested and performs as expected.

CAB requested information:

Date: 2013-10-17
Time: 0600
Systems affected: hgssh1 and hgssh2
End-user impact: users will be able to request a pushlog by issuing the following command: ssh -l username@mozilla.com hg.mozilla.org pushlog mozilla-central
Maintenance plan and timeline: ?
Rollback plan: copy original file back into place, revert file in svn, update puppet masters
Notification mechanisms: send an email to concerned parties, CAB
Person on point: Me. Others should be minimally affected. Releng could bring someone to do additional review if they like.
Flags: cab-review?
Approved by the CAB on 16 Oct to be done on 17 Oct.
Assignee: server-ops → bkero
Flags: cab-review? → cab-review+
(Assignee)

Comment 2

5 years ago
This push was rolled out. Confirmed working.

bkero@Gluttony:~$ ssh -l bkero@mozilla.com hg.mozilla.org pushlog build/tools > bt.sql
bkero@Gluttony:~$ file bt.sql
bt.sql: SQLite 3.x database
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Product: mozilla.org → Infrastructure & Operations

Updated

3 years ago
Change Request: --- → approved
Flags: cab-review+
You need to log in before you can comment on or make changes to this bug.