Skip to content
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

kill: Fix test-admins' ability to kill #1932

Merged
merged 1 commit into from
Apr 17, 2024
Merged

kill: Fix test-admins' ability to kill #1932

merged 1 commit into from
Apr 17, 2024

Conversation

zmc
Copy link
Member

@zmc zmc commented Apr 12, 2024

By testing access to /bin/true, we were getting false negatives as we meant to be testing for access to /bin/kill. With our configuration, any sudo access indicates access to /bin/kill.

By testing access to /bin/true, we were getting false negatives as we meant
to be testing for access to /bin/kill. With our configuration, any sudo access
indicates access to /bin/kill.

Signed-off-by: Zack Cerza <[email protected]>
@zmc zmc requested a review from rishabh-d-dave April 12, 2024 18:28
Copy link
Member

@VallariAg VallariAg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to kill a run so tested with these changes and it worked:

(virtualenv) vallariag@teuthology:~/src/teuthology$ teuthology-kill -o scheduled_vallariag@teuthology -m smithi -r vallariag-2024-04-15_05:24:46-rbd:nvmeof-main-distro-default-smithi
2024-04-15 06:11:15,566.566 INFO:teuthology.kill:Assembling run information...
2024-04-15 06:11:15,593.593 INFO:teuthology.kill:Checking Beanstalk Queue...
2024-04-15 06:11:31,689.689 INFO:teuthology.kill:Killing Pids: {208152}
Matching Defaults entries for vallariag on teuthology:
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin, !requiretty, visiblepw

User vallariag may run the following commands on teuthology:
    (root) NOPASSWD: /bin/kill, /usr/bin/kill
2024-04-15 06:11:33,202.202 INFO:teuthology.kill:Nuking machines: ['smithi053', 'smithi089', 'smithi122', 'smithi170']
2024-04-15 06:11:34,564.564 INFO:teuthology.kill:2024-04-15 06:11:34,563.563 INFO:teuthology.nuke:targets:
2024-04-15 06:11:34,564.564 INFO:teuthology.kill:  smithi053.front.sepia.ceph.com: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKKQ2J1RLT+Aniw4q7lYM1YqQIhmoVs68j1cZqnEFezo6EEJx9FCc6mrIpcxsN1Bz1Gk5Lqpx7AnDPm7tZJ9ctg=
2024-04-15 06:11:34,564.564 INFO:teuthology.kill:  smithi089.front.sepia.ceph.com: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCuEwJ9BppMi10RDkk/AF3jMJRh6F919bQNDfijPdIyw8JWsjAHVENwKKKdY8pU9fuxkrJ0ZIgyCyZE0vom3M4Y=
2024-04-15 06:11:34,564.564 INFO:teuthology.kill:  smithi122.front.sepia.ceph.com: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC+kNlHyWKLSLRpuhAa3dNzWsGrGd0A0ELV+K5BwWqv3UVAdyDfAsLv1GbUZtA0oaDPLLGohgKaezf44gLjTKGY=
2024-04-15 06:11:34,564.564 INFO:teuthology.kill:  smithi170.front.sepia.ceph.com: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGaurU3lXir/XGRw75HkvJ3XOdeBCHAnJeVHqmscjcUEmyoWG7eC5dhinTOmdlEzxGdG5kdP/Mqmj87RiY0BT88=
2024-04-15 06:11:34,565.565 INFO:teuthology.kill:2024-04-15 06:11:34,564.564 INFO:teuthology.nuke:Checking targets against current locks
2024-04-15 06:11:34,665.665 INFO:teuthology.kill:2024-04-15 06:11:34,665.665 INFO:teuthology.task.internal.check_lock:Checking locks...
2024-04-15 06:11:34,743.743 INFO:teuthology.kill:2024-04-15 06:11:34,742.742 INFO:teuthology.task.internal.check_lock:Checking locks...
2024-04-15 06:11:34,779.779 INFO:teuthology.kill:2024-04-15 06:11:34,779.779 INFO:teuthology.task.internal.check_lock:Checking locks...
2024-04-15 06:11:34,811.811 INFO:teuthology.kill:2024-04-15 06:11:34,810.810 INFO:teuthology.task.internal.check_lock:Checking locks...
2024-04-15 06:11:34,873.873 INFO:teuthology.kill:2024-04-15 06:11:34,872.872 INFO:teuthology.orchestra.console.smithi053:Power off
2024-04-15 06:11:34,921.921 INFO:teuthology.kill:2024-04-15 06:11:34,921.921 INFO:teuthology.orchestra.console.smithi089:Power off
2024-04-15 06:11:34,942.942 INFO:teuthology.kill:2024-04-15 06:11:34,942.942 INFO:teuthology.orchestra.console.smithi122:Power off
2024-04-15 06:11:35,001.001 INFO:teuthology.kill:2024-04-15 06:11:35,001.001 INFO:teuthology.orchestra.console.smithi170:Power off
2024-04-15 06:11:43,370.370 INFO:teuthology.kill:2024-04-15 06:11:43,369.369 INFO:teuthology.orchestra.console.smithi170:Power off completed
2024-04-15 06:11:43,543.543 INFO:teuthology.kill:2024-04-15 06:11:43,542.542 INFO:teuthology.lock.ops:unlocked: smithi170.front.sepia.ceph.com
2024-04-15 06:11:47,381.381 INFO:teuthology.kill:2024-04-15 06:11:47,381.381 INFO:teuthology.orchestra.console.smithi053:Power off completed
2024-04-15 06:11:47,416.416 INFO:teuthology.kill:2024-04-15 06:11:47,415.415 INFO:teuthology.orchestra.console.smithi089:Power off completed
2024-04-15 06:11:47,438.438 INFO:teuthology.kill:2024-04-15 06:11:47,438.438 INFO:teuthology.orchestra.console.smithi122:Power off completed
2024-04-15 06:11:47,572.572 INFO:teuthology.kill:2024-04-15 06:11:47,572.572 INFO:teuthology.lock.ops:unlocked: smithi053.front.sepia.ceph.com
2024-04-15 06:11:47,600.600 INFO:teuthology.kill:2024-04-15 06:11:47,599.599 INFO:teuthology.lock.ops:unlocked: smithi089.front.sepia.ceph.com
2024-04-15 06:11:47,607.607 INFO:teuthology.kill:2024-04-15 06:11:47,607.607 INFO:teuthology.lock.ops:unlocked: smithi122.front.sepia.ceph.com
2024-04-15 06:11:47,720.720 INFO:teuthology.report:Marking job 7657065 as dead

@dmick dmick merged commit 9481b1d into main Apr 17, 2024
8 checks passed
@dmick dmick deleted the fix-test-admins-kill branch April 17, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants