Skip to content

Conversation

sriramandev
Copy link
Contributor

@sriramandev sriramandev commented Aug 13, 2025

Change description

Currently the builder user is not deleted, just locked, which could pose security risks for qemu, raw, nutanix and maas. So based on the suggestions, cleaning up the user just like in the case of ova.

Related issues

Additional context

This changeset has been introduced on the basis of the discussions that happened as part of PR.

Currently the builder user is not deleted, just locked, which could pose
security risks for qemu, raw, nutanix and maas. So based on the
suggestions, cleaning up the user just like in the case of ova.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 13, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 13, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @sriramandev. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@sriramandev
Copy link
Contributor Author

/assign

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 13, 2025
@sriramandev
Copy link
Contributor Author

@AverageMarcus @ffais Based on the discussions in PR creating this PR. Kindly have a look and provide your comments on the same.

@ffais
Copy link
Contributor

ffais commented Aug 13, 2025

@sriramandev I tested your changes on the raw target, the build completed successfully, the user and sudoers files were deleted, but I received this error:

==> qemu: userdel: user builder is currently used by process 774
==> qemu: userdel: builder mail spool (/var/mail/builder) not found

Does the same thing happen to you with OVA?

@sriramandev
Copy link
Contributor Author

@sriramandev I tested your changes on the raw target, the build completed successfully, the user and sudoers files were deleted, but I received this error:

==> qemu: userdel: user builder is currently used by process 774
==> qemu: userdel: builder mail spool (/var/mail/builder) not found

Does the same thing happen to you with OVA?

Interesting, no, do not see this in OVA.

@ffais
Copy link
Contributor

ffais commented Aug 14, 2025

I ran further tests, and the user is being deleted correctly. At this point, I think it's just a warning we can ignore.

@drew-viles
Copy link
Contributor

Could you test it with pkill -u builder before trying the remove? This may solve the error. I suspect because the pipeline is still technically running and tasks are being executed by the user, this is where it's coming from. I'm slightly reluctant to add it with the error is all because people may wonder where it's coming from.

The pkill, may just kill the pipeline ofc making it a non-viable option. Just a thought. :-)

If you don't have time I can look at it later but I'm slammed atm.

@ffais
Copy link
Contributor

ffais commented Aug 22, 2025

@drew-viles I ran some tests using pkill, but unfortunately the build times out. My suspicion is that pkill terminates the ssh session, preventing the pipeline from completing.

However, I can't figure out why this error doesn't appear on OVA.

@drew-viles
Copy link
Contributor

Thanks for confirming.

If you're sure it's removing the user I'm happy to proceed personally unless anyone else can interject with another idea ofc.

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 22, 2025
@ffais
Copy link
Contributor

ffais commented Aug 22, 2025

Yes, I can confirm that builder user is not present anymore, on all tests with RAW target, despite the warning message.

@drew-viles
Copy link
Contributor

drew-viles commented Aug 24, 2025

/lgtm

/assign @mboersma

Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 25, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mboersma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 25, 2025
@k8s-ci-robot k8s-ci-robot merged commit b6806b9 into kubernetes-sigs:main Aug 25, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup builder user residue - raw, qemu, nutanix and maas
5 participants