Ticket #5448 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Record startup problem (rainbow)

Reported by: rwh Owned by: rwh
Priority: high Milestone: Update.1
Component: camera-activity Version:
Keywords: rainbow-integration Cc: mstone, olpc-dev@…, jg
Action Needed: Verified: no
Deployments affected: Blocked By:
Blocking:

Description

Record does not start on joyride 1398. Log attached.

Probably issue with rainbow on dir-access.

Attachments

record.log (4.1 kB) - added by rwh 7 years ago.

Change History

Changed 7 years ago by rwh

  Changed 7 years ago by jg

  • cc mstone added
  • keywords rainbow-integration added
  • milestone changed from Never Assigned to Update.1

  Changed 7 years ago by AlexL

I got the same error in the logs on Joyride 1408. After turning off security, (rm /etc/olpc-security) Record loaded fine.

  Changed 7 years ago by mstone

I'm not sure why you're trying to 'rm -rf' the instance dir, but it will probably work better if you use the correct path.

According to the rainbow source code, this should be /activities/uid_to_instance_dir/<uid>, not /activities/uid_to_home_dir/<uid>/instance. Does $SAR/instance point to the wrong place?

  Changed 7 years ago by erikb

Will review and have fix out tomorrow.

  Changed 7 years ago by erikb

  • cc olpc-dev@… added

  Changed 7 years ago by erikb

  • status changed from new to assigned

To get the instance directory in an activity, we call

os.path.join( self.get_activity_root(), "letsCallThisInstance" )

and to make the shared between sessions tmp directory we call:

os.path.join( self.get_activity_root(), "letsCallThisTmp" )

The source code, while well-organized, is a little oblique. What should activity authors call to get the instance and shared tmp directories?

  Changed 7 years ago by mstone

Something equivalent to

sar = os.environ['SUGAR_ACTIVITY_ROOT']
instance_dir = os.path.join(sar, 'instance')
tmp_dir = os.path.join(sar, 'tmp')
data_dir = os.path.join(sar, 'data')

ought to do the trick.

  Changed 7 years ago by mstone

This turns out to be more subtle than I recognized on the first read. The fundamental issue is that permission to unlink inodes (i.e. to delete a dirent) is granted by authority of having write access to the containing directory. This makes things exciting in our model since activities are granted write access to neither /activities/uid_to_home_dir/<uid> (which would allow you to unlink the 'instance' symlink) or nor /activities/uid_to_instance_dir (which would allow you to unlink the directory pointed to by the 'instance' symlink). In conclusion, since you are actually trying to return the instance and temp dirs to a pristine state, you should do _exactly_ that by unlinking the inodes contained in those directories (and nothing else) or you should handle the permissions errors that result from attempting to unlink inodes contained in directories to which you do not have write access.

  Changed 7 years ago by erikb

  • status changed from assigned to closed
  • resolution set to fixed

Thanks, got it. Fix is Record v47.

follow-up: ↓ 11   Changed 7 years ago by erikb

  • cc jg added
  • keywords rainbow-integration, ship.2? added; rainbow-integration removed

JG - can we get this into ship.2? Just switched the paths to the right Rainbow places.

in reply to: ↑ 10   Changed 7 years ago by erikb

Replying to erikb:

JG - can we get this into ship.2? Just switched the paths to the right Rainbow places.

err... update.1 :-)

  Changed 7 years ago by jg

  • keywords rainbow-integration added; rainbow-integration, ship.2? removed

Ok for update.1.

  Changed 7 years ago by jg

  • status changed from closed to reopened
  • resolution deleted

  Changed 7 years ago by jg

  • owner changed from erikb to dgilmore
  • status changed from reopened to new

  Changed 7 years ago by marco

  • status changed from new to closed
  • resolution set to fixed

This is not in yet. Please let's try to get it all the approved packages as soon as possible, otherwise the process becomes really painful.

  Changed 7 years ago by marco

  • status changed from closed to reopened
  • resolution deleted

Argh, obviously I didn't mean to close it.

  Changed 7 years ago by dgilmore

  • owner changed from dgilmore to rwh
  • status changed from reopened to new

please test build 661

  Changed 7 years ago by rwh

  • status changed from new to closed
  • resolution set to fixed

Verified as working in update-1 build 665

Note: See TracTickets for help on using tickets.