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

User and group modifications should respect forcelocal

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 5.3.3
    • Fix Version/s: PUP 5.4.0
    • Component/s: Types and Providers
    • Labels:
    • Environment:

      RHEL 6 and 7

    • Template:
    • Sub-team:
    • Team:
      Platform Core
    • Sprint:
      Platform Core KANBAN
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      When forcelocal is set to true, the groupadd and useradd modules now use local commands for modifying and deleting user and group resources. Prior to this, local commands were only used for adding group and user resources when forcelocal was set to true.
    • QA Risk Assessment:
      No Action

      Description

      The user and group resources do not use local commands when modifying a user or group. This can result in failure to make changes to locally added user or groups if that user or group already exists in LDAP.

      Example error:

      2017-11-21 09:19:49 -0500 Puppet (err): Could not set gid on group[munge]: Execution of '/usr/sbin/groupmod -g 73 munge' returned 4: groupmod: GID '73' already exists
      2017-11-21 09:19:49 -0500 /Stage[main]/Munge::User/Group[munge]/gid (err): change from 486 to 73 failed: Could not set gid on group[munge]: Execution of '/usr/sbin/groupmod -g 73 munge' returned 4: groupmod: GID '73' already exists
      

      Using lgroupmod on this particular system was only way to allow Puppet to continue to function.

      lgroupmod -g 73 munge
      

      This issue presented itself when Puppet was told to set munge UID/GID after the package had already auto-created the user/group with different UID/GID. The module that adds the user/group uses forcelocal=>true

      https://github.com/treydock/puppet-munge/blob/master/manifests/user.pp

      I propose that both user and group resources respect forcelocal for all types of operations.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  melissa Melissa Stone
                  Reporter:
                  treydock Trey Dockendorf
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: