Bug 760263 - agent fails to generate drift content zip
agent fails to generate drift content zip
Product: RHQ Project
Classification: Other
Component: drift (Show other bugs)
Unspecified Windows
medium Severity medium (vote)
: ---
: ---
Assigned To: John Sanda
Mike Foley
Depends On: jon30-sprint10/rhq43-sprint10
Blocks: 707225
  Show dependency treegraph
Reported: 2011-12-05 12:42 EST by Libor Zoubek
Modified: 2015-11-01 19:42 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-02-07 14:24:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Libor Zoubek 2011-12-05 12:42:35 EST
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 13:44:39 EST
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 14:24:46 EST
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.