Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-3339

Puppet user provider failing to reset puppet uid on Fedora19 due to usermod bug

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.7.1
    • Fix Version/s: PUP 3.7.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      fedora19

    • Template:
    • Sprint:
      Platform 2014-10-01

      Description

      This failure is showing up in the following acceptance test: acceptance/tests/config/puppet_manages_own_configuration_in_robust_manner.rb, but only on Fedora19. This test removes the puppet user/group and then confirms that the --mkusers flag allows the puppet master to recreate them. Before doing this, it records the current user/group state, and then in the final teardown step, reapplies the origina user/group state.

      The failure began showing up after a fix to this test in 1d3fc272 began halting the test if the final puppet apply to reset the puppet user/group failed. It is likely that this was always failing, but we only began to see it with this change.

      https://jenkins.puppetlabs.com/job/Puppet-Package-Acceptance-stable/label=beaker,platform=fedora19/61/

      I've attached a detailed log of the point of failure, but don't know why it's failing.

      UPDATE:

      After further investigation, this issue was found to be caused by a bug in the usermod command on Fedora 19. The bug does not appear to be present on Fedora 20. Since Fedora 19 is approaching end of life, we've decided not to fix this issue and just confine the acceptance test not to run on Fedora 19. The following output illustrates the bug which is causing the issue:

      Fedora 20:

      [root@bd4849uiz04imoa ~]# usermod -u 1000 test
      [root@bd4849uiz04imoa ~]# cat /etc/passwd
      test:x:1000:1000::/home/test:/bin/bash
      [root@bd4849uiz04imoa ~]# ls -l /home/
      drwxr-xr-x. 3 test test 4096 Sep 25 13:27 test
      [root@bd4849uiz04imoa ~]# ls -l /var/spool/mail/
      -rw-rw----. 1 test mail 0 Sep 25 13:20 test
      [root@bd4849uiz04imoa ~]# usermod -u 53 test
      [root@bd4849uiz04imoa ~]# ls -l /home/
      drwxr-xr-x. 3 test test 4096 Sep 25 13:27 test
      [root@bd4849uiz04imoa ~]# ls -l /var/spool/mail/
      -rw-rw----. 1 test mail 0 Sep 25 13:20 test
      

      Fedora 19:

      [root@nykbnzgen65yxtt ~]# usermod -u 1000 test
      [root@nykbnzgen65yxtt ~]# cat /etc/passwd
      test:x:1000:1000::/home/test:/bin/bash
      [root@nykbnzgen65yxtt ~]# ls -l /home/
      drwxr-xr-x. 3 test test 4096 Sep 25 13:27 test
      [root@nykbnzgen65yxtt ~]# ls -l /var/spool/mail/
      -rw-rw----. 1 test mail 0 Sep 25 13:20 test
      [root@nykbnzgen65yxtt ~]# usermod -u 53 test
      usermod: Failed to change ownership of the home directory
      [root@nykbnzgen65yxtt ~]# ls -l /var/spool/mail/
      -rw-rw----. 1 test mail 0 Sep 25 13:20 test
      [root@nykbnzgen65yxtt ~]# ls -l /home/
      drwxr-xr-x. 3 1000 test 4096 Sep 25 13:27 test
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                joshua.partlow Joshua Partlow
                QA Contact:
                Eric Thompson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support