Bug 760263 - agent fails to generate drift content zip
Summary: agent fails to generate drift content zip
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: drift
Version: 4.2
Hardware: Unspecified
OS: Windows
medium
medium
Target Milestone: ---
: ---
Assignee: John Sanda
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: jon30-sprint10, rhq43-sprint10
Blocks: 707225
TreeView+ depends on / blocked
 
Reported: 2011-12-05 17:42 UTC by Libor Zoubek
Modified: 2015-11-02 00:42 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-02-07 19:24:46 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 838681 0 high CLOSED DriftFileSenderTest.doNotSendEmptyZipFile fails on java7 2021-02-22 00:41:40 UTC

Internal Links: 838681

Description Libor Zoubek 2011-12-05 17:42:35 UTC
Description of problem: when agent does not find any of file requested by server to deliver its content, it fails, we need to add check for such situation (which can occur when all files are deleted at a time between agent reported file paths & SHAs and server processed it and requests content of some files)


Version-Release number of selected component (if applicable):
Version: 3.0.0.GA
Build Number: e23441b:4e746e8

How reproducible:always
  
Actual results:

Agent shows up exception

ERROR [pool-3-thread-1] (rhq.core.pc.drift.DriftManager)- An error occurred while trying to send content for changeset[resourceId: 10004, driftDefinition: Template-File System]
java.util.zip.ZipException: ZIP file must have at least one entry
	at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:304)
	at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:146)
	at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:321)
	at org.rhq.core.pc.drift.DriftManager.sendChangeSetContentToServer(DriftManager.java:362)
	at org.rhq.core.pc.drift.DriftFilesSender.run(DriftFilesSender.java:70)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)


Expected results: No such exception occurs

Comment 1 John Sanda 2011-12-12 18:44:39 UTC
Added check so that the agent does not attempt to create empty zip file. I also added some additional debug logging to show which drift files are going into the zip file.

master commit hash: 35fcafbd977ca41cb2cbff7be81787543c5224e8

Comment 2 Mike Foley 2012-02-07 19:24:46 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE


Note You need to log in before you can comment on or make changes to this bug.