-
Notifications
You must be signed in to change notification settings - Fork 291
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>
VallariAg
approved these changes
Apr 15, 2024
There was a problem hiding this 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.