-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
[JENKINS-42846] - Fix regressions in images after slave.jar => agent.jar renaming with improper symlink #82
[JENKINS-42846] - Fix regressions in images after slave.jar => agent.jar renaming with improper symlink #82
Conversation
…jar renaming with improper symlink
&& chmod 755 /usr/share/jenkins \ | ||
&& chmod 644 /usr/share/jenkins/slave.jar \ | ||
&& chmod 644 /usr/share/jenkins/agent.jar \ | ||
&& ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar \ |
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.
-f
flag here was a bad idea, yes
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.
I think you don't really want full pathnames here, if you reference an agent.jar
located in same directory as the slave.jar
symlink. Full names make work with alternate root FSes (backups, look into containers from hosts, etc.) problematic, relative symlinks ease this pain a lot.
With GNU tooling, ln -sr
trims the original absolute or relative path to required relative minimum, and sets that into the value of symlink.
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.
I suggest doing it as a follow-up. Just fixing the images now so that they do not fall apart
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.
Yes, sure, this nit is not urgent :)
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.
I now can't remember why I added the -f flag, but maybe it does something different than what I originally thought. Why is it a bad idea?
-f flag "remove existing destination files", and hence it suppressed the
issue in this case (wrong argument ordering)
…On Fri, Sep 20, 2019 at 4:14 PM Natasha Stopa ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Dockerfile-alpine
<#82 (comment)>:
> && chmod 755 /usr/share/jenkins \
- && chmod 644 /usr/share/jenkins/slave.jar \
+ && chmod 644 /usr/share/jenkins/agent.jar \
+ && ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar \
I now can't remember why I added the -f flag, but maybe it does something
different than what I originally thought. Why is it a bad idea?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#82>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAW4RICRHFVBJ7BHW2IA7PTQKTLEBANCNFSM4IYV2Z6A>
.
|
ln works differently in Mac and Linux? When I check the man pages on my Mac it says the following for -f: If the target file already exists, then unlink it so that the link may occur. (The -f option overrides any previous -i options.) |
Fixes agents. 3.35-1 is completely broken, and emergency reviews will be appreciated