$SNAP_APP_USER_DATA_PATH points to non-existing directory for services

Bug #1527612 reported by Kyle Fazzari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Status tracked in Trunk
15.04
Won't Fix
Undecided
Unassigned
Trunk
Fix Released
Undecided
Unassigned
snap-confine
Fix Released
Undecided
Unassigned

Bug Description

For a Snappy binary, $SNAP_APP_USER_DATA_PATH is created within the binary wrapper right before the binary is launched[1]. However, no such logic exists for services, where the $SNAP_APP_USER_DATA_PATH resolves to /root/apps/... . This means that if a Snappy service tries to use $SNAP_APP_USER_DATA_PATH, it's trying to use a directory that doesn't exist. This leads services to either fail or try to create /root/apps, which obviously can't happen.

[1]: https://github.com/ubuntu-core/snappy/blob/master/snappy/click.go#L87

Related branches

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

The proposed fix is to remap $SNAP_APP_USER_DATA_PATH to $SNAP_APP_DATA_PATH, which makes more sense for services to write to anyway.

Changed in snappy:
assignee: nobody → Kyle Fazzari (kyrofa)
Revision history for this message
Kyle Fazzari (kyrofa) wrote :
Changed in snappy:
status: New → In Progress
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

This remapping proposal leads to the possibility of a service trying to save a file named the same to both the user data path and the data path, resulting in a clash. A better solution would be to extract the user data path creation from the wrapper and add such functionality to ubuntu-core-launcher instead. This would simply make the user data path a valid directory for both services and binaries.

Kyle Fazzari (kyrofa)
description: updated
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

This bug is a blocker when it comes to ROS services created with Snapcraft, since they require a working $SNAP_USER_DATA directory.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This is fixed in launcher trunk and uploaded to the Ubuntu archive and the image ppa for xenial.

Changed in ubuntu-core-launcher:
status: New → Fix Released
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The 15.04 series is EOLd and not developed anymore.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.