Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1352152 - rpm-ostree compatibility
Summary: rpm-ostree compatibility
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: vagrant
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1352154
TreeView+ depends on / blocked
 
Reported: 2016-07-01 19:46 UTC by Colin Walters
Modified: 2016-08-03 13:25 UTC (History)
5 users (show)

Fixed In Version: vagrant-1.8.5-1.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-03 13:25:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Write out via create-new-then-rename (1.19 KB, patch)
2016-07-06 01:43 UTC, Colin Walters
no flags Details | Diff

Description Colin Walters 2016-07-01 19:46:27 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=1348671
for an example of this elsewhere.

Now I added:
https://github.com/projectatomic/rpm-ostree/pull/364
But vagrant appears to do truncate-in-place:

Jul 01 15:14:02 icarus.verbum.local rpm-ostreed[15270]:         from -e:4:in `<main>'
Jul 01 15:14:02 icarus.verbum.local rpm-ostreed[15270]:         from /usr/share/vagrant/lib/vagrant/plugin/state_file.rb:39:in `add_plugin'
Jul 01 15:14:02 icarus.verbum.local rpm-ostreed[15270]:         from /usr/share/vagrant/lib/vagrant/plugin/state_file.rb:94:in `save!'
Jul 01 15:14:02 icarus.verbum.local rpm-ostreed[15270]:         from /usr/share/vagrant/lib/vagrant/plugin/state_file.rb:94:in `open'
Jul 01 15:14:02 icarus.verbum.local rpm-ostreed[15270]:         from /usr/share/vagrant/lib/vagrant/plugin/state_file.rb:94:in `open'
Jul 01 15:14:02 icarus.verbum.local rpm-ostreed[15270]: /usr/share/vagrant/lib/vagrant/plugin/state_file.rb:94:in `initialize': Read-only file system @ rb_sysopen - /var/lib/vagrant/plugins.json (Errno::EROFS)


So the minimal fix for this is to change the code to do create-new-then-rename, like I did for texinfo (and most other software does).

Additionally,  would be nice to also move the state cache to /usr/lib/vagrant directly in the RPM, so we wouldn't have to carry the change in rpm-ostree.

Comment 1 Vít Ondruch 2016-07-04 10:32:42 UTC
Hi Colin,

Let me think about it, since TBH, I am quite negative about such change. It will be just additional complexity without obvious reasons ...

Also, I'd be much happier, if upstream was using something completely different then this single plugin configuration file. If each plugin had its own configuration file, we would not need to register the plugin neither have something stored in /var.

Just FTR, this is the snipped used in %post section:

http://pkgs.fedoraproject.org/cgit/rpms/vagrant.git/tree/macros.vagrant#n36

and this is where it fails for your use case:

https://github.com/mitchellh/vagrant/blob/master/lib/vagrant/plugin/state_file.rb#L94

Comment 2 Colin Walters 2016-07-06 01:43:15 UTC
Created attachment 1176679 [details]
Write out via create-new-then-rename

Comment 3 Colin Walters 2016-07-06 01:45:34 UTC
Also submitted upstream https://github.com/mitchellh/vagrant/pull/7550

Comment 4 Vít Ondruch 2016-08-03 13:25:34 UTC
This was included in 1.8.5 if I am not mistaken, so this should be part of F25.


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