-
Notifications
You must be signed in to change notification settings - Fork 1
Guest Info add JNLP Secret variable #1
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
base: master
Are you sure you want to change the base?
Conversation
allow start in interactive mode slave in windows machine on Guest Start
This change cause the UUID is shorter and you work with shorter VM names
this change cause vm name are shorter, and have same posibilities of random
pjdarton
left a comment
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.
OK, I see what you're doing here.
I can't "accept" the changes because (a) you've asked me to accept your changes into my own fork, rather than into the actual main code, (b) you're asking me to merge it into my "master" and not a branch, (c) I'm not sure how to accept your changes into a branch because I don't fully understand git and (d) there's a lot of formatting changes that drown out the actual change.
However, I get the idea and I'll see what I can do to make this happen.
See comments in https://issues.jenkins-ci.org/browse/JENKINS-20743
|
Well I pulled the request to your main branch because it's releated with your actual pull request on the main jenkins branch, you added this new feature of "guest properties" but it's not integrated yet to the main branch. So I expected you accept my pull request and add this changes to your actual pull request. I have planed to pull and other request to you, I added this "guest properties" new feature to the build step vsphere clases clone and deploy. And I want to tell you, thank you for your work, It's just what I needed!! |
|
The pull request which adds the GuestInfo functionality (which your I do have a larger enhancement awaiting merge ( As for future work regarding guestinfo - I think that it would be nice to I agree that it would also be useful as a build step - hopefully the way I Regards, Peter On 19 September 2016 at 18:58, segator [email protected] wrote:
|
pjdarton
left a comment
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.
A UUID, as used by the original code, is 128 bits of data. A single long, which is what you're using here, is only 64 bits, and not all of that will be random due to the use of toString.
However, as I've also battled Windows path length issue in the past, I understand the concept :-)
I've got code-changes locally that solve this "VM name too long" issue differently - once my other PR is merged, I'll be able to issue that one too.
The technique I've got locally is:
a) For templates which have an instance cap of N machines, I use names of prefix_1, prefix_2 ... prefix_N (and ensure that it doesn't use one that's currently in use). This reduces the length of the "unique" bit down from 36 characters (the length of UUID's toString()) to 1-3 characters.
b) For templates which have no cap, I use a UUID to provide the random number, and then render that 128-bit number using BigInteger's toString(MAX_RADIX). This drops the length from 36 characters to 26 characters.
If 26 characters is still too long then I guess we could use the (64bit long) milliseconds since 1970, which should drop it to around 13 characters.
I added the ${JNLP_SECRET} to be used by the cloud template, this is very usefull if you want to execute jenkins slave on windows machine auto deployed and you are using secured slave connections.
And also The UUID generated to have random VM name I reduced using base MAX_RADIX, same random security but shorter name, this is because maybe you want to use the vmname to create directories, and in windows we have a limit of chars for the path