New issue
Advanced search Search tips

Issue 829552 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Remove periodic_reboot_secs magic value in state

Project Member Reported by mar...@chromium.org, Apr 5 2018

Issue description

Goal:
- Reduce magicness, no more automatic reboot by default
- Make bot_config more explicit about its behavior
- Simplify the server
- Simplify API

AIs:
1. Add os_utilities.uptime() and deploy.
2. Change all bot_config:
 - get_state(): set state['periodic_reboot_secs'] = 0
 - on_bot_idle(): if os_utitilies.uptime() > 12*60: bot.reboot_host()
3. Remove server and bot 'periodic_reboot_secs' implementation and documentation.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-py.git/+/6c102b66d1097266c5a6d86d6a960077a1af7be3

commit 6c102b66d1097266c5a6d86d6a960077a1af7be3
Author: Marc-Antoine Ruel <maruel@chromium.org>
Date: Mon Apr 09 22:09:42 2018

swarming: add Bot.get_pseudo_rand()

This permits a pseud-random factor that is different for each bot.

Update bot_config.py with example how to use it.

Bug:  829552 
Change-Id: I994b5778c6db7274e9a2ce682a5c0ab9f7021f1a
Reviewed-on: https://chromium-review.googlesource.com/1003235
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>

[modify] https://crrev.com/6c102b66d1097266c5a6d86d6a960077a1af7be3/appengine/swarming/swarming_bot/api/bot.py
[modify] https://crrev.com/6c102b66d1097266c5a6d86d6a960077a1af7be3/appengine/swarming/swarming_bot/api/bot_test.py
[modify] https://crrev.com/6c102b66d1097266c5a6d86d6a960077a1af7be3/appengine/swarming/swarming_bot/config/bot_config.py

Project Member

Comment 2 by bugdroid1@chromium.org, Apr 13 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/4ec8fdef66fa3a5d4383c76365cd087563b182e6

commit 4ec8fdef66fa3a5d4383c76365cd087563b182e6
Author: Marc-Antoine Ruel <maruel@chromium.org>
Date: Fri Apr 13 20:43:31 2018

Project Member

Comment 3 by bugdroid1@chromium.org, Apr 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-py.git/+/09cb7ab5156881f01a131b1c981ac6e1993a5c5e

commit 09cb7ab5156881f01a131b1c981ac6e1993a5c5e
Author: Marc-Antoine Ruel <maruel@chromium.org>
Date: Mon Apr 16 21:41:40 2018

[swarming] Get rid of the magic periodic_reboot_secs

Stop using a magic value in state. This is much clearer for users looking at the
code.

A better way in bot_config was implemented in 6c102b66d1097266.

Remove stale compatibility symbols in os_utilities.

Bug:  829552 
Change-Id: I35be1de371a9469d6cdbc377c8bd61b0fee7b430
Reviewed-on: https://chromium-review.googlesource.com/998545
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>

[modify] https://crrev.com/09cb7ab5156881f01a131b1c981ac6e1993a5c5e/appengine/swarming/doc/Magic-Values.md
[modify] https://crrev.com/09cb7ab5156881f01a131b1c981ac6e1993a5c5e/appengine/swarming/handlers_bot.py
[modify] https://crrev.com/09cb7ab5156881f01a131b1c981ac6e1993a5c5e/appengine/swarming/handlers_bot_test.py
[modify] https://crrev.com/09cb7ab5156881f01a131b1c981ac6e1993a5c5e/appengine/swarming/server/bot_management.py
[modify] https://crrev.com/09cb7ab5156881f01a131b1c981ac6e1993a5c5e/appengine/swarming/server/bot_management_test.py
[modify] https://crrev.com/09cb7ab5156881f01a131b1c981ac6e1993a5c5e/appengine/swarming/swarming_bot/api/os_utilities.py

Comment 4 by mar...@chromium.org, Apr 16 2018

Owner: mar...@chromium.org
Status: Fixed (was: Available)
One less legacy thing!
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/2949b95f0a5db4061b79ffc23be843496e9cd910

commit 2949b95f0a5db4061b79ffc23be843496e9cd910
Author: Marc-Antoine Ruel <maruel@chromium.org>
Date: Fri Apr 20 13:17:21 2018

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/0b5bf90d3d3936621b8994c33a5e0b0c2f2c9e7f

commit 0b5bf90d3d3936621b8994c33a5e0b0c2f2c9e7f
Author: Marc-Antoine Ruel <maruel@chromium.org>
Date: Fri Apr 20 13:41:47 2018

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-py.git/+/d4fb435e4fa907b580ef9f8a23bae49fc124e578

commit d4fb435e4fa907b580ef9f8a23bae49fc124e578
Author: Marc-Antoine Ruel <maruel@chromium.org>
Date: Tue Apr 24 17:16:37 2018

[swarming] comment out default reboot in on_bot_idle added in 6c102b66d1097

We don't want this to happen by default. It interfere with smoke tests.

Bug:  829552 
Change-Id: I27fbcad548b152eea2c5f1e8f2c10924510def1f
Reviewed-on: https://chromium-review.googlesource.com/1019846
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>

[modify] https://crrev.com/d4fb435e4fa907b580ef9f8a23bae49fc124e578/appengine/swarming/swarming_bot/config/bot_config.py

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 25 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/infradata/config/+/d40a87a3a0e4b46ae355bdc16214d35453622149

commit d40a87a3a0e4b46ae355bdc16214d35453622149
Author: Marc-Antoine Ruel <maruel@chromium.org>
Date: Wed Apr 25 23:27:37 2018

Sign in to add a comment