Opened 9 years ago

Closed 9 years ago

#885 closed defect (fixed)

The ProjectArchive permission checker should use smaller batches with chmod commands

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: Reggie v4.4
Component: net.sf.basedb.reggie Keywords:
Cc:

Description

The current implementation will search for all files with incorrect file permission (see #864). All changes are batched into a single command. We have noted that some files (running a manual find returns 19041 files with read permission for everyone) still have incorrect permissions and in the log file there are some error messages:

net.schmizz.sshj.transport.TransportException: Broken pipe
	at net.schmizz.sshj.transport.TransportImpl.write(TransportImpl.java:443)
	at net.schmizz.sshj.connection.channel.AbstractChannel.sendChannelRequest(AbstractChannel.java:355)
	at net.schmizz.sshj.connection.channel.direct.SessionChannel.exec(SessionChannel.java:101)
	at net.sf.basedb.reggie.ssh.SshHost.executeCmd(SshHost.java:372)
	at net.sf.basedb.reggie.projectarchive.ProjectArchiveService.permissionCheck(ProjectArchiveService.java:300)
	at net.sf.basedb.reggie.projectarchive.ProjectArchiveService$PermissionCheckTask.run(ProjectArchiveService.java:340)
	at net.sf.basedb.util.timer.ThreadTimerTask$1.run(ThreadTimerTask.java:89)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Broken pipe
	at java.net.SocketOutputStream.socketWrite0(Native Method)
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
	at net.schmizz.sshj.transport.TransportImpl.write(TransportImpl.java:440)
	... 7 more

I think this could be related to that the service is trying to fix the permission of all 19k files at the same time. I think we should try to use smaller batches and see if the problem goes away.

Change History (1)

comment:1 by Nicklas Nordborg, 9 years ago

Resolution: fixed
Status: newclosed

(In [3918]) Fixes #885: The ProjectArchive permission checker should use smaller batches with chmod commands

The chmod commands are now batched at most 100 at a time.

Note: See TracTickets for help on using tickets.