Page MenuHomePhabricator

build new .deb for adminbot/morebots, install on toollabs
Closed, ResolvedPublic

Description

after recent changes (https://gerrit.wikimedia.org/r/#/c/223046/) we need to build a new version .deb of adminbot/morebots
and get it installed on toollabs

https://wikitech.wikimedia.org/wiki/Morebots

also:

08:12 < Coren> mutante: Once upon a time, we used a local repo for this; you might want to double check with apt source morbots comes from now.

Event Timeline

Dzahn raised the priority of this task from to Needs Triage.
Dzahn updated the task description. (Show Details)
Dzahn subscribed.
Dzahn added a subscriber: Elee.

A simple debuild seems to correctly build it, except for a few lintian issues

E: adminbot changes: bad-distribution-in-changes-file precise-wikimedia
W: adminbot source: diff-contains-git-control-dir .git
W: adminbot source: missing-license-text-in-dep5-copyright gpl-3.0+ (paragraph at line 50)
W: adminbot source: ancient-standards-version 3.9.3.1 (current is 3.9.5)
E: adminbot: extended-description-is-empty

as far as I am concerned, we can either put this on apt.wm.o or in the local repository for tool labs; the latter is probably easier?

For the long term, I think it would be good to move this off tool labs with wikibugs and grrrit-wm (T104616)

Change 223575 had a related patch set uploaded (by Dzahn):
up version to 1.7.7 - add year to logs

https://gerrit.wikimedia.org/r/223575

Change 223575 merged by jenkins-bot:
up version to 1.7.7 - add year to logs

https://gerrit.wikimedia.org/r/223575

i built 1.7.7 and imported it into our APT repo:

http://apt.wikimedia.org/wikimedia/pool/main/a/adminbot/

BUT.. why is 1.7.6 not there?? while it is installed on tools-bastion:

ii adminbot 1.7.6

"adminbot is already the newest version."

yea, so 1.7.5 and 1.7.7 is for precise, but tools-bastion runs trusty

carbon:

Skipping inclusion of 'adminbot' '1.7.8' in 'trusty-wikimedia|main|amd64', as it has already '1.7.8'.
Skipping inclusion of 'adminbot' '1.7.8' in 'trusty-wikimedia|main|i386', as it has already '1.7.8'.
Skipping inclusion of 'adminbot' '1.7.8' in 'trusty-wikimedia|main|source', as it has already '1.7.8'.

tools-bastion-01:

adminbot is already the newest version.

root@tools-bastion-01:~# apt-cache policy adminbot
adminbot:

Installed: 1.7.6
Candidate: 1.7.6
Version table:

sorry, no time for this. why does this always have to be such a big deal?

Change 223576 had a related patch set uploaded (by Dzahn):
up to 1.7.8 for trusty rebuild

https://gerrit.wikimedia.org/r/223576

Change 223576 merged by Dzahn:
up to 1.7.8 for trusty rebuild

https://gerrit.wikimedia.org/r/223576

https://gerrit.wikimedia.org/r/#/c/180890/ (add URL to log output)
https://gerrit.wikimedia.org/r/#/c/223735/ (deb package 1.7.9)

merged both changes by valhallasw.

built 1.7.9 on the building host in prod, copper. uploaded it to carbon to /srv/wikimedia/incoming/ .. tried to import it with reprepro.

shows up here http://apt.wikimedia.org/wikimedia/pool/main/a/adminbot/

but i'm afraid something still went wrong with signatures so it didnt get update for real ..

@carbon:/srv/wikimedia# reprepro ls adminbot                              
adminbot | 1.6.3 |   lucid-wikimedia | amd64, source
adminbot |   1.4 |   lucid-wikimedia | amd64
adminbot | 1.7.9 | precise-wikimedia | amd64, i386, source
adminbot | 1.7.8 |  trusty-wikimedia | amd64, i386, source
adminbot | 1.7.6 |  trusty-wikimedia | amd64, i386

so i made a mistake being in the wrong environment on the repo host when using reprepro commands which meant it did not regenerate indices which is why the server didn't see the new package yet.

anyways, fixed that and succesfully imported it. so after apt-get update on tools-exec-1203

The following packages will be upgraded:
  adminbot
1 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
Need to get 13.1 kB of archives.
After this operation, 27.6 kB of additional disk space will be used.
Get:1 http://apt.wikimedia.org/wikimedia/ precise-wikimedia/main adminbot all 1.7.9 [13.1 kB]
Fetched 13.1 kB in 0s (0 B/s)
(Reading database ... 99530 files and directories currently installed.)
Preparing to replace adminbot 1.7.6 (using .../adminbot_1.7.9_all.deb) ...
Unpacking replacement adminbot ...
chmod: cannot access `/usr/lib/adminbot/README': No such file or directory
dpkg: error processing adminbot (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 adminbot
..
E: Sub-process /usr/bin/dpkg returned an error code (1)

..
iF  adminbot                                                    1.7.9
cd /usr/lib/adminbot
touch README
apt-get remove adminbot
apt-get install adminbot


root@tools-exec-1203:/usr/lib/adminbot# dpkg -l | grep adminbot
ii  adminbot                                                    1.7.9                                Logging on command for IRC and Mediawiki Software
Dzahn claimed this task.

that broke puppet across all exec nodes.. with the help of AndrewBogott applied the fix above on all of them. making puppet happy again.

i did restart the morebots copy running in the production channel.. it came back but logging itself fails :/

19:12 < mutante> and the !log doesnt even work in the new version ? arrg
19:12 < andrewbogott> morebots, you there?
19:12 < morebots> I am a logbot running on tools-exec-1213.
19:12 < morebots> Messages are logged to wikitech.wikimedia.org/wiki/Server_Admin_Log.
19:12 < morebots> To log a message, type !log <msg>.
19:12 < andrewbogott> !log testing

i did restart the morebots copy running in the production channel.. it came back but logging itself fails :/

from production-logbot.err:

2015-07-10 02:32:43,928 DEBUG: 'production-logbot' got '!log are you back'; Attempting to log.
2015-07-10 02:32:45,055 ERROR: Failed to log message

Traceback (most recent call last):
  File "/usr/lib/adminbot/adminlogbot.py", line 266, in on_pubmsg
    pageurl = adminlog.log(self.config, message, project, author)
  File "/usr/lib/adminbot/adminlog.py", line 42, in log
    undef, year, month, day, undef = line.split(" ", 4)
ValueError: need more than 4 values to unpack
2015-07-10 02:52:32,718 ERROR: Died in main event loop
Traceback (most recent call last):
  File "/usr/lib/adminbot/adminlogbot.py", line 364, in <module>
    bot.ircobj.process_once(timeout=0.1)
  File "/usr/lib/python2.7/dist-packages/irclib.py", line 213, in process_once
    (i, o, e) = select.select(sockets, [], [], timeout)

re-included 1.7.9 in APT repo