[JIRA] [periodicbackup-plugin] (JENKINS-30260) Add node and label directories to periodic backup cycle

2015-09-08 Thread christoph.zausner...@infineon.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Nebu Kadnezar updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-30260 
 
 
 
  Add node and label directories to periodic backup cycle  
 
 
 
 
 
 
 
 
 
 
Correct patch now (switched orig and patched directory) 
 
 
 
 
 
 
 
 
 

Change By:
 
 Nebu Kadnezar 
 
 
 

Attachment:
 
 AdditionalDirectories_v2.patch 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [periodicbackup-plugin] (JENKINS-30260) Add node and label directories to periodic backup cycle

2015-09-08 Thread christoph.zausner...@infineon.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Nebu Kadnezar updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-30260 
 
 
 
  Add node and label directories to periodic backup cycle  
 
 
 
 
 
 
 
 
 

Change By:
 
 Nebu Kadnezar 
 
 
 

Attachment:
 
 AdditionalDirectories.patch 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [periodicbackup-plugin] (JENKINS-30260) Add node and label directories to periodic backup cycle

2015-09-02 Thread christoph.zausner...@infineon.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Nebu Kadnezar created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-30260 
 
 
 
  Add node and label directories to periodic backup cycle  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Patch 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Attachments:
 

 AdditionalDirectories.patch 
 
 
 

Components:
 

 periodicbackup-plugin 
 
 
 

Created:
 

 02/Sep/15 8:45 AM 
 
 
 

Environment:
 

 Jenkins 1.618, periodicbackup-plugin master 
 
 
 

Priority:
 
  Major 
 
 
 

Reporter:
 
 Nebu Kadnezar 
 
 
 
 
 
 
 
 
 
 
The Jenkins configuration contains config.xmls for the nodes and a labels directory with machine description xmls. But these files are not part of the backup strategy. The attached patch adds the "nodes" and "labels" directories to the backup list like its already done for others. 
 
 
 
 
 
 
 
 
 
 

[JIRA] [core] (JENKINS-19743) Massive parallel builds sometimes cause errors in LogRotation

2015-03-30 Thread christoph.zausner...@infineon.com (JIRA)














































Nebu Kadnezar
 commented on  JENKINS-19743


Massive parallel builds sometimes cause errors in LogRotation















Hi Daniel,

this is not a fix only a working workaround for the issue. See attached Run.txt and LogRotator.txt file for diff patch.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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] [core] (JENKINS-19743) Massive parallel builds sometimes cause errors in LogRotation

2015-03-30 Thread christoph.zausner...@infineon.com (JIRA)














































Nebu Kadnezar
 updated  JENKINS-19743


Massive parallel builds sometimes cause errors in LogRotation
















Change By:


Nebu Kadnezar
(30/Mar/15 3:16 PM)




Attachment:


LogRotator.txt





Attachment:


Run.txt



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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] [core] (JENKINS-19743) Massive parallel builds sometimes cause errors in LogRotation

2015-03-25 Thread christoph.zausner...@infineon.com (JIRA)














































Nebu Kadnezar
 commented on  JENKINS-19743


Massive parallel builds sometimes cause errors in LogRotation















We’ve find out that following source changes on Jenkins version 1.606 are a workaround to handle the issue.

1. Adaption on Run.java on the method delete()

Run.java
/**
 * Deletes this build and its entire log
 *
 * @throws IOException
 *  if we fail to delete.
 */
public void delete() throws IOException {

		File rootDir = getRootDir();
if (!rootDir.isDirectory()) {
		LOGGER.log(Level.WARNING, "IOException: " + rootDir + " looks to have already been deleted; siblings: " + Arrays.toString(project.getBuildDir().list()));
//throw new IOException(this + ": " + rootDir + " looks to have already been deleted; siblings: " + Arrays.toString(project.getBuildDir().list()));
}

RunListener.fireDeleted(this);

synchronized (this) { // avoid holding a lock while calling plugin impls of onDeleted
File tmp = new File(rootDir.getParentFile(),'.'+rootDir.getName());

if (tmp.exists()) {
Util.deleteRecursive(tmp);
}
// TODO on Java 7 prefer: Files.move(rootDir.toPath(), tmp.toPath(), StandardCopyOption.ATOMIC_MOVE)
boolean renamingSucceeded = rootDir.renameTo(tmp);
Util.deleteRecursive(tmp);
// some user reported that they see some left-over .xyz files in the workspace,
// so just to make sure we've really deleted it, schedule the deletion on VM exit, too.
if(tmp.exists())
tmp.deleteOnExit();

if(!renamingSucceeded) {
LOGGER.log(Level.WARNING, rootDir+" is in use");
			//throw new IOException(rootDir+" is in use");
		}
LOGGER.log(FINE, "{0}: {1} successfully deleted", new Object[] {this, rootDir});

removeRunFromParent();
}
}
 

2. Adaption on LogRotator.java on the method perform(Job job)

LogRotator.java
public void perform(Job job) throws IOException, InterruptedException {
LOGGER.log(FINE, "Running the log rotation for {0} with numToKeep={1} daysToKeep={2} artifactNumToKeep={3} artifactDaysToKeep={4}", new Object[] {job, numToKeep, daysToKeep, artifactNumToKeep, artifactDaysToKeep});

// always keep the last successful and the last stable builds
Run lsb = job.getLastSuccessfulBuild();
Run lstb = job.getLastStableBuild();

if(numToKeep!=-1) {
// Note that RunList.size is deprecated, and indeed here we are loading all the builds of the job.
// However we would need to load the first numToKeep anyway, just to skip over them;
// and we would need to load the rest anyway, to delete them.
// (Using RunMap.headMap would not suffice, since we do not know if some recent builds have been deleted for other reasons,
// so simply subtracting numToKeep from the currently last build number might cause us to delete too many.)
			
			try
			{
Listextends Run> builds = job.getBuilds();
for (Run r : copy(builds.subList(Math.min(builds.size(), numToKeep), builds.size( {
	if (shouldKeepRun(r, lsb, lstb)) {
		continue;
	}
	LOGGER.log(FINE, "{0} is to be removed", r);
	r.delete();
}
			}
			catch(Exception e)
			{
LOGGER.log(FINE, "subList creating failed", e);
			}
}
 



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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] [core] (JENKINS-19743) Massive parallel builds sometimes cause errors in LogRotation

2015-03-23 Thread christoph.zausner...@infineon.com (JIRA)














































Nebu Kadnezar
 updated  JENKINS-19743


Massive parallel builds sometimes cause errors in LogRotation
















We've built a Jenkins test project where we can reproduce the issue. Following requirements and project setup describes how you we can reproduce the error deterministically.

Software requirements:

	Jenkins version 1.598
	Build Flow Plugin version 0.9.1
	Java version 1.7.0_72
	C# Script execution engine version 3.8.10.0
	C# Script BuildFlowPluginTest.cs



Test environment:

	Jenkins master runs on a virtual machine with Windows 7 SP1 32 bit
	8 Jenkins slaves physical machines with Windows7 SP1 64 bit
	6 Jenkins slaves virtual machines with Windows 7 SP1 32 bit



Jenkins projects

We have two Jenkins Build Flow projects:

	StressTest_Job
	StressTest_Job_2
Both are executing the same StressTest_SubJob. 




	Create a Build Flow project StressTest_Job and StressTestJob_2 with following configuration like on the screenshots (see attached StressTest_Job_config_1 - StressTest_Job_config_3).
	Create a Jenkins project job similar to the screenshots (see attached StressTest_SubJob_config_1 - StressTest_SubJob_config_3). The only difference to our configuration is the section "Source Code Management". Set this configuration to "None" and add on the section "Build\Command" a copy command which copies the "BuildFlowPluginTest.cs" to the Jenkins slave workspace for execution.



Sample command code for the build section (Windows batch):


@echo off 

xcopy /e "\\Server\project\ BuildFlowPluginTest.cs" %workspace% 

ping %Parameter% -n 10

cscs BuildFlowPluginTest.cs 1

ping %Parameter% -n 10



See also the attached C# script BuildFlowPluginTest.cs code.





Change By:


Nebu Kadnezar
(23/Mar/15 4:14 PM)




Attachment:


BuildFlowPluginTest.cs





Attachment:


StressTest_Job_config_1.png





Attachment:


StressTest_Job_config_2.png





Attachment:


StressTest_Job_config_3.png





Attachment:


StressTest_SubJob_config_1.png





Attachment:


StressTest_SubJob_config_2.png





Attachment:


StressTest_SubJob_config_3.png



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.