Skip to content

Convert hex to decimal in defaults.yaml #206

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

Merged
merged 1 commit into from
Apr 21, 2018

Conversation

noelmcloughlin
Copy link
Contributor

Fixes issue.

[INFO    ] Executing state file.directory for [/etc/postgresql/9.5/main]
[ERROR   ] Failed to change mode to 0509```

@noelmcloughlin
Copy link
Contributor Author

noelmcloughlin commented Apr 10, 2018

But maybe default permission should be 0700

2018-04-10 15:33:30 MDT [51099-1] FATAL:  data directory "/var/lib/postgresql/9.5/main" has group or world access
2018-04-10 15:33:30 MDT [51099-2] DETAIL:  Permissions should be u=rwx (0700).

But that causes unless check to fail (permission denied) on formula reruns.

The fix is adding follow state to relax permissions (before cmd.run) & reapplying 0700 afterwards.

postgresql-cluster-prepared
  file.directory:
    - name: {{ postgres.data_dir }}
    - user: {{ postgres.user }}
    - group: {{ postgres.group }}
    - makedirs: True
    - recurse:
      - user
      - group
      - mode
    - dir_mode: 755
  cmd.run:
  ... etc ...

Copy link
Contributor

@vutny vutny left a comment

Choose a reason for hiding this comment

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

👍 Yeah, this is a pitfall of YAML importing.
Thanks for the fix!

@noelmcloughlin
Copy link
Contributor Author

@vutny thanks for looking!!!

@noelmcloughlin noelmcloughlin merged commit 14e3601 into saltstack-formulas:master Apr 21, 2018
@noelmcloughlin noelmcloughlin deleted the fixDirMode branch April 22, 2018 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants