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

Remove executable bit from some files #6894

Merged
merged 1 commit into from
Nov 30, 2020

Conversation

dchusovitin
Copy link
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug

/kind cleanup

/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
It's just chmod -x

I think the executable bit was originally added by mistake. It is not necessary because these files are not locally executed. When copying to the server, the correct permissions are set.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 7, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @dchusovitin. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 7, 2020
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 7, 2020
@oomichi
Copy link
Contributor

oomichi commented Nov 9, 2020

I agree to remove executable bit from yml files but it also is fine to keep the bit on files which contain #!/bin/bash even if it doesn't affect actual operation.
I'd like to see other opinions.

/ok-to-test
/lgtm

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 9, 2020
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 9, 2020
@floryut
Copy link
Member

floryut commented Nov 9, 2020

I agree to remove executable bit from yml files but it also is fine to keep the bit on files which contain #!/bin/bash even if it doesn't affect actual operation.
I'd like to see other opinions.

/ok-to-test
/lgtm

Kind of agree with you, great cleanup but we might keep the +x on sh file, doesn't hurt and might be useful for guys cloning and executing directly (I sometime do weird thing like that 😄 )

@dchusovitin
Copy link
Contributor Author

@oomichi, @floryut

Maybe you are right, but most of these scripts requires root privileges on your local host and can affect your file system. If you are sure that you need this, you can execute sudo sh ./script.sh

  • Root privileges required (writes to /opt/bin)
roles/bootstrap-os/files/bootstrap.sh
  • Contains jinja2 syntax ({{ x }}), so you get a syntax error
roles/etcd/templates/etcd.j2
roles/etcd/templates/make-ssl-etcd.sh.j2
  • Root privileges required (ip link ...)
roles/network_plugin/macvlan/files/ifup-macvlan
roles/network_plugin/macvlan/files/ifup-local
roles/network_plugin/macvlan/files/ifdown-macvlan

Of course, I can restore +x on these files.

@oomichi
Copy link
Contributor

oomichi commented Nov 10, 2020

I just don't have strong opinion to say "please don't do that" when someone add executable bit for such files.
Either is fine, that is the reason why I already put my lgtm :-)

@dchusovitin
Copy link
Contributor Author

It's a little bit confusing, if you are working in a terminal.

@electrocucaracha
Copy link
Contributor

I noticed that this PR modifies some templates and files so I just wondering if it should be nice to modify the ansible task to include the correct mode value for them.

@EppO
Copy link
Contributor

EppO commented Nov 13, 2020

I would keep the +x on the .sh files but I'm fine with the YAML files to be 644.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 26, 2020
@dchusovitin
Copy link
Contributor Author

chmod -x only on yaml and j2
Branch is up to date with the latest master.

@LuckySB
Copy link
Contributor

LuckySB commented Nov 28, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dchusovitin, LuckySB

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 28, 2020
@oomichi
Copy link
Contributor

oomichi commented Nov 30, 2020

Thanks

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 30, 2020
@k8s-ci-robot k8s-ci-robot merged commit c09aaba into kubernetes-sigs:master Nov 30, 2020
@floryut floryut mentioned this pull request Dec 19, 2020
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants