[JIRA] (JENKINS-40279) Disabling of Jenkins setup wizard not working as expected

2016-12-09 Thread thomas.wikst...@tieto.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Wikström commented on  JENKINS-40279  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Disabling of Jenkins setup wizard not working as expected   
 

  
 
 
 
 

 
 Sorry, but we're not only after documentation fixes, Daniel. We think we have two real bugs right now: 1) Disabling the Setup Wizard doesn't work as expected when using system property -Djenkins.install.runSetupWizard=false Problematic code part we think should be reviewed. 

 

https://github.com/jenkinsci/jenkins/blob/stable-2.19/core/src/main/java/jenkins/install/InstallUtil.java
...
// tests need this to be 1.0
private static final VersionNumber NEW_INSTALL_VERSION = new VersionNumber("1.0");
private static final VersionNumber FORCE_NEW_INSTALL_VERSION = new VersionNumber("0.0");
...
VersionNumber lastRunVersion = new VersionNumber(getLastExecVersion());

// Neither the top level config or the lastExecVersionFile have a version
// stored in them, which means it's a new install.
if (FORCE_NEW_INSTALL_VERSION.equals(lastRunVersion) || lastRunVersion.compareTo(NEW_INSTALL_VERSION) == 0) {  <=== When does this case normally happen?
Jenkins j = Jenkins.getInstance();

// Allow for skipping			<=== If-clause working as expected when reached
if(shouldNotRun) {
try {
InstallState.INITIAL_SETUP_COMPLETED.initializeState();
return j.getInstallState();
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
...
}
 

 Similar issues where this issue have been touched upon/mentioned/seen: https://issues.jenkins-ci.org/browse/JENKINS-34007 https://issues.jenkins-ci.org/browse/JENKINS-34035 2) Suppressing the Upgrade Wizard doesn't work using "session variable" -Djenkins.install.UpgradeWizard.show=false Unfortunately this approach number two given to us didn't help us forward. We set it the ordinary way using JAVA_OPTS, right or wrong?  As mentioned earlier, we can't find the methods accessing this "session variable" being called.  Do you want us to file a separate ticket on this?   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 

[JIRA] (JENKINS-40279) Disabling of Jenkins setup wizard not working as expected

2016-12-08 Thread thomas.wikst...@tieto.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Wikström commented on  JENKINS-40279  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Disabling of Jenkins setup wizard not working as expected   
 

  
 
 
 
 

 
 No, sorry for the confusion: the Upgrade Wizard (the banner) still appears. We aren't either interested in the Setup Wizard being executed, but that is perhaps not the case if the Upgrade Wizard is disabled?  Yes, they both showed up correctly among the System Properties and Environment Variables (JAVA_OPTS). (don't have a screen shot right now)  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-40279) Disabling of Jenkins setup wizard not working as expected

2016-12-08 Thread thomas.wikst...@tieto.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Wikström commented on  JENKINS-40279  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Disabling of Jenkins setup wizard not working as expected   
 

  
 
 
 
 

 
 Hi Daniel, and thanks for your quick attention to our issues! To be clear about what we are trying to achieve, it is not to only to hide the wizard, but to stop it from executing at all.  We tried adding the system property -Djenkins.install.UpgradeWizard.show=false , both this property alone and in conjunction with -Djenkins.install.runSetupWizard=false ,unfortunately with no effect. The setup wizard still appears.  We had a quick look at the implementation and it seems like the method reading out the value from jenkins.install.UpgradeWizard.show is never called. Or did we miss something here? When this didn't work we dug deeper to find a workable solution for our issue. In the below file we found the handling of the runSetupWizard option a bit strange. https://github.com/jenkinsci/jenkins/blob/stable-2.19/core/src/main/java/jenkins/install/InstallUtil.java If creating file jenkins.install.InstallUtil.lastExecVersion either with value "0.0" or "1.0" you will jump into the part of the code where the handling of jenkins.install.runSetupWizard=false is implemented. And allowing us to bypass the execution of the wizard like we wanted.  After bypassing the setup wizard the file jenkins.install.InstallUtil.lastExecVersion is updated with the current Jenkins version. When performing future upgrades of Jenkins the file will be used and versions (current and future) compared in part of the code where it is unable to skip the setup wizard. If we do not reset the value to "0.0" (or "1.0") prior to the upgrade. Is it really the intention? Is this a better work around of our issue than the previous one mentioned (jenkins.install.UpgradeWizard.state)? Thanks in advance!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 
  

[JIRA] (JENKINS-40279) Disabling of Jenkins setup wizard not working as expected

2016-12-07 Thread thomas.wikst...@tieto.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Wikström updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-40279  
 
 
  Disabling of Jenkins setup wizard not working as expected   
 

  
 
 
 
 

 
Change By: 
 Thomas Wikström  
 

  
 
 
 
 

 
 We are deploying and installing Jenkins for customers using a framework of ours, where we are packaging Tomcat, Jenkins, plugins and other maintenance tools to have a full server up and running. To be able to do this in a controlled manner for the customer, in for example an upgrade situation, we want to disable the setup wizard. https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+propertiesjenkins.install.runSetupWizard: "_Set to false to skip install and upgrade wizards._"We are setting the system property *jenkins.install.runSetupWizard* to false to skip both install and upgrade wizards.{panel}JAVA_OPTS:-Xms500m -Xmx500m -XX:MetaspaceSize=128M -XX:MaxMetaspaceSize=1024M  -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCompressedOops -XX:+UseG1GC -XX:MaxGCPauseMillis=400 -XX:GCPauseIntervalMillis=8000 -Djava.awt.headless=true -Dhudson.model.ParametersAction.keepUndefinedParameters=true -Djenkins.install.runSetupWizard=false -javaagent:./dist/ssl/sys-props-agent.jar=props:./dist/ssl/private/syspropsagent.properties -XX:HeapDumpPath=//logs/{panel}But still the setup wizard is appearing when upgrading like below. Going from:Tomcat 7.0.50, Jenkins 1.651.3Going to:Tomcat 8.5.5, Jenkins 2.19.1, -Djenkins. install. runSetupWizard=falseUpgrading in our terms means: /usr//usr//usr/in_production//proj/jenkins_home/ [ JENKINS_HOME is kept separated from installation; plugins, jobs, customer data etc ]Stop old Tomcat/Jenkins, install new Tomcat/Jenkins in parallel, *change symlinks (old->new installation)*, start new Tomcat/Jenkins. And yes, we understand we might be doing a (parallel) install in your terms, when we perform the above "upgrade". 1) We simply can't understand under which situations this system property is supposed to DISABLE the setup wizard? Is it not supposed to be working when running Jenkins in Tomcat? It IS described to "skip install *and* upgrade wizards". As we somehow needed to get this to work we have done extensive googling and trying out several approaches where users seem to have struggling with this as well. One workaround tested was this: https://github.com/geerlingguy/ansible-role-jenkins/issues/50Where we ONLY are adding the mentioned file with the value of "2.0" (no newline) [ TEST THIS - ONLY the file, NOT the runSetupWizard=false option ]  Create the file JENKINS_HOME/jenkins.install.UpgradeWizard.state with one line, 2.0( echo -n 2.0 > $JENKINS_HOME/jenkins.install.UpgradeWizard.state )VOILA, no setup wizard appearing after login to upgraded Jenkins! 2) Is this a supported, recommended way of disabling the wizard? Are there any pitfalls going this way? Or are we simply working around a bug here?   
 

  
 
   

[JIRA] (JENKINS-40279) Disabling of Jenkins setup wizard not working as expected

2016-12-07 Thread thomas.wikst...@tieto.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Wikström updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-40279  
 
 
  Disabling of Jenkins setup wizard not working as expected   
 

  
 
 
 
 

 
Change By: 
 Thomas Wikström  
 
 
Environment: 
 - Docker version 1.10.3, build 20f81dd- CentOS Linux release 7.2.1511 (Core)- Java(TM) SE Runtime Environment, 1.8.0_45-b14- Tomcat 8.5.5- Jenkins 2.19.1, -Djenkins. install. runSetupWizard=false  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-40279) Disabling of Jenkins setup wizard not working as expected

2016-12-07 Thread thomas.wikst...@tieto.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Wikström created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-40279  
 
 
  Disabling of Jenkins setup wizard not working as expected   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 core  
 
 
Created: 
 2016/Dec/07 1:37 PM  
 
 
Environment: 
 - Docker version 1.10.3, build 20f81dd  - CentOS Linux release 7.2.1511 (Core)  - Java(TM) SE Runtime Environment, 1.8.0_45-b14  - Tomcat 8.5.5  - Jenkins 2.19.1, -Djenkins.runSetupWizard=false  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Thomas Wikström  
 

  
 
 
 
 

 
 We are deploying and installing Jenkins for customers using a framework of ours, where we are packaging Tomcat, Jenkins, plugins and other maintenance tools to have a full server up and running.  To be able to do this in a controlled manner for the customer, in for example an upgrade situation, we want to disable the setup wizard.  https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties jenkins.install.runSetupWizard: "Set to false to skip install and upgrade wizards." We are setting the system property jenkins.install.runSetupWizard to false to skip both install and upgrade wizards. 

 
JAVA_OPTS: -Xms500m -Xmx500m -XX:MetaspaceSize=128M -XX:MaxMetaspaceSize=1024M -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCompressedOops -XX:+UseG1GC -XX:MaxGCPauseMillis=400 -XX:GCPauseIntervalMillis=8000 -Djava.awt.headless=true -Dhudson.model.ParametersAction.keepUndefinedParameters=true -Djenkins.install.runSetupWizard=false -javaagent:./dist/ssl/sys-props-agent.jar=props:./dist/ssl/private/syspropsagent.properties -XX:HeapDumpPath=//logs/ 

  

[JIRA] (JENKINS-34880) When using multiple updateSites, tool installer download fails if one UC is missing installers

2016-07-06 Thread thomas.wikst...@tieto.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Wikström commented on  JENKINS-34880  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: When using multiple updateSites, tool installer download fails if one UC is missing installers   
 

  
 
 
 
 

 
 We experience the same problem in version 1.651.3, could the solution (JENKINS-34880) be implemented there as well? Regards /Thomas  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.