-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix(install): replace gid_from_name
(deprecated in develop
)
#40
Conversation
Best reviewed: commit by commit
Optimal code review plan
|
Hi. I don't think the build failures are because of anything I have changed but this is entirely new to me. Would anyone be able to look over the build log and, if it is me that has made an error, give me a hint? Thanks |
etcd/install.sls
Outdated
group.present: | ||
- name: {{ etcd.group or 'etcd' }} | ||
- system: True | ||
- require_in: | ||
- user: etcd-user-group-home |
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.
Why is this section being removed? I don't use this formula so I can't be sure if this should be done or not. If it should be, then it would be worth mentioning the rationale in the PR's main comment, so that future developers can understand what the thought process was.
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.
Group is referenced here:
Line 40 in d4c849a
- group: {{ etcd.group or 'etcd' }} |
Thanks for preparing this PR, @ShaunMaher.
Many of our formulas have well-maintained CI in place but no-one has got around to fixing things in this formula yet. Let's not worry about it too much right now. Once we're happy with the changes (see my inline comment), we won't let that get in the way of getting this merged. |
Hi @ShaunMaher I see myii is reviewing. I just noticed a preexising bug
Would you mind setting |
@noelmcloughlin etcd-formula/etcd/defaults.yaml Line 26 in d4c849a
Should that be repurposed to be used in the template? |
That makes sense - I have not looked at this formula in a long time - just noticed the PR in passing. Looks like CI needs work |
Group is in the map too. |
etcd/install.sls
Outdated
user.present: | ||
- name: {{ etcd.user or 'etcd' }} | ||
- gid_from_name: True | ||
- gid: {{ etcd.user or 'etcd' }} |
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.
Based on @noelmcloughlin's comment, it looks like this should be:
- gid: {{ etcd.user or 'etcd' }} | |
- gid: {{ etcd.group or 'etcd' }} |
Except `gid` should be numeric - is gid needed - whatever gid the system
allocates is fine.
…On Fri, Jul 17, 2020 at 6:30 PM Imran Iqbal ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In etcd/install.sls
<#40 (comment)>
:
> user.present:
- name: {{ etcd.user or 'etcd' }}
- - gid_from_name: True
+ - gid: {{ etcd.user or 'etcd' }}
Based on @noelmcloughlin <https://github.com/noelmcloughlin>'s comment
<https://github.com/saltstack-formulas/etcd-formula/pull/40/files#r456573876>,
it looks like this should be:
⬇️ Suggested change
- - gid: {{ etcd.user or 'etcd' }}
+ - gid: {{ etcd.group or 'etcd' }}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#40 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADFUUQUZXZHLVZU4XGRGOWDR4CDC7ANCNFSM4O3Z4XDQ>
.
|
Hi. Sorry about the delay. Thank you everyone for the feedback. I have made a couple of new changes, hopefully satisfying everyone. @noelmcloughlin, according to the saltstack doco, gid doesn't have to be numeric: "The id of the default group to assign to the user. Either a group name or gid can be used. If not ..." (https://docs.saltstack.com/en/latest/ref/states/all/salt.states.user.html) @myii, regarding "etcd.group" I agree, updated PR to reflect this change. @myii, regarding the systemd unit template, I have included a fix. I have also wrapped User= and Group= lines in Cheers. |
@ShaunMaher Thanks for making the changes. There's still this to be resolved either way: #40 (comment). |
Thanks @ShaunMaher If we use |
Ok, yep. I was assuming that specifying a gid that didn't exist would have salt create the group. Never assume. I'll restore "group.present" and the spots that included it as a require. |
Ok. How about that? |
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.
Thanks for working through this.
@ShaunMaher Nice work, that's been merged. |
Thanks @ShaunMaher great cooperation and response! |
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]
Changes related to the build system[chore]
Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]
Changes to the continuous integration configuration[feat]
A new feature[fix]
A bug fix[perf]
A code change that improves performance[refactor]
A code change that neither fixes a bug nor adds a feature[revert]
A change used to revert a previous commit[style]
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]
Documentation changes[test]
Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE
?No.
Related issues and/or pull requests
Close #39
Describe the changes you're proposing
Remove use of the deprecated "gid_from_name" property of user.present.
Pillar / config required to test the proposed changes
An existing working pillar should continue to work unmodified.
Debug log showing how the proposed changes work
I'm not sure how to do this, sorry.
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).I'm not sure how to do this, sorry.
Additional context