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

Ignition fails on duplicate user UIDs #977

Open
Quantum-Sicarius opened this issue May 12, 2020 · 3 comments · May be fixed by #985
Open

Ignition fails on duplicate user UIDs #977

Quantum-Sicarius opened this issue May 12, 2020 · 3 comments · May be fixed by #985

Comments

@Quantum-Sicarius
Copy link

Quantum-Sicarius commented May 12, 2020

Bug

Ignition validation does not consider duplicate user UIDs causing a failure to boot.

Operating System Version

Fedora 32

Ignition Version

v2.3.0

Environment

What hardware/cloud provider/hypervisor is being used to run Ignition?
VMware

Expected Behavior

Validation should pickup duplicate UIDs that will cause bootstrap to fail.

Actual Behavior

Core OS does not boot and drops into an emergency console.

Reproduction Steps

Create a fcc file with users that have a duplicate UID:

    - name: user1
      home_dir: /home/user1
      groups:
        - wheel
        - sudo
        - docker
      shell: /bin/bash
      uid: 9002
    
    - name: user2
      home_dir: /home/user2
      groups:
        - wheel
        - sudo
        - docker
      shell: /bin/bash
      uid: 9002
@bgilbert
Copy link
Contributor

Duplicate UIDs are valid. We should probably pass --non-unique to useradd to avoid the failure.

@bgilbert bgilbert changed the title Ignition validation does not consider duplicate user UIDs Ignition fails on duplicate user UIDs May 13, 2020
@Quantum-Sicarius
Copy link
Author

Cool, thanks for clearing that up. I am willing to create a pull request if you can point me to the source code which is responsible for the useraddition.

@bgilbert
Copy link
Contributor

Thanks! See EnsureUser and CreateGroup here. We should probably have a blackbox test for this also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants