Page MenuHomePhabricator

Make stashbot log multiple things at once
Open, LowPublic

Description

Example from operations today:

[16:22:38] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1001.eqiad.wmnet
[16:22:38] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1002.eqiad.wmnet
[16:22:38] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1003.eqiad.wmnet
[16:22:39] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1004.eqiad.wmnet
[16:22:39] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1005.eqiad.wmnet
[16:22:40] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1006.eqiad.wmnet
[16:22:41] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1007.eqiad.wmnet
[16:22:41] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1008.eqiad.wmnet
[16:22:42] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1009.eqiad.wmnet
[16:22:43] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:22:43] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1010.eqiad.wmnet
[16:22:44] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1011.eqiad.wmnet
[16:22:44] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1012.eqiad.wmnet
[16:22:45] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1013.eqiad.wmnet
[16:22:46] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1014.eqiad.wmnet
[16:22:46] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:22:47] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1015.eqiad.wmnet
[16:22:48] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1016.eqiad.wmnet
[16:22:48] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1017.eqiad.wmnet
[16:22:49] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1018.eqiad.wmnet
[16:22:50] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:22:50] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1019.eqiad.wmnet
[16:22:51] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1020.eqiad.wmnet
[16:22:52] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1021.eqiad.wmnet
[16:22:52] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1022.eqiad.wmnet
[16:22:53] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1023.eqiad.wmnet
[16:22:53] <logmsgbot> !log mlitn@tin Started scap: Enable 3D extension
[16:22:53] <logmsgbot> !log akosiaris@puppetmaster1001 conftool action : set/weight=5; selector: name=wtp1024.eqiad.wmnet
[16:22:53] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
(...)
[16:22:57] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:01] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:05] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
(...)
[16:23:08] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:12] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:16] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:19] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
(...)
[16:23:22] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
(...)
[16:23:24] <akosiaris> !log change wtp1001 to wtp1024 weights to 5 from 15 in preparation for deprecation
[16:23:25] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:29] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:32] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:36] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:39] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:43] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:46] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:49] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:53] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:56] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:23:59] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
(...)
[16:24:03] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:24:07] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log
[16:24:11] <stashbot> Logged the message at https://wikitech.wikimedia.org/wiki/Server_Admin_Log

So this takes a lot of time, and the timestamp in the SAL is not the original one then too.

Event Timeline

What should the threshold for de-duplication be? The only way that is coming to mind to implement this simply would make stashbot always wait for the configured delay before responding in-channel to the !log ... message. If set too long people will think the bot is stuck/broken or that they typed the command wrong.

For this particular example, an update to conftool might be more appropriate, but I'm not sure. I have never looked at it's code.

bd808 triaged this task as Low priority.Aug 7 2019, 9:42 PM
bd808 moved this task from Backlog to Graveyard on the Stashbot board.