Bug 1226520 - ostree does not always switch to the new atomic release after an upgrade
Summary: ostree does not always switch to the new atomic release after an upgrade
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ostree
Version: 22
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Colin Walters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1254859 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-30 08:14 UTC by Todor Todorov
Modified: 2015-08-20 09:41 UTC (History)
4 users (show)

Fixed In Version: ostree-2015.6-2.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-07 16:04:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Todor Todorov 2015-05-30 08:14:56 UTC
Description of problem:
I have 3 VMs with fedora-atomic 22.15 which I upgraded to fedora-atomic 22.20.
After I rebooted the 3 VMs two of them have booted again fedora-atomic 22.15 while the third one has booted fedora-atomic 22.20.

Version-Release number of selected component (if applicable):
fedora-atomic 22.15 (Stable)
Fedora-Cloud_Atomic-x86_64-22.iso

How reproducible:
-bash-4.3# ostree admin status
* fedora-atomic f59229a5923479ac913aa0442c4e93b6bad162496cd4e119232c7f6212bb2072.0
    Version: 22.15
    origin refspec: fedora-atomic:fedora-atomic/f22/x86_64/docker-host
-bash-4.3# setenforce 0
-bash-4.3# ostree admin upgrade -r

670 metadata, 3038 content objects fetched; 171937 KiB transferred in 212 seconds
Copying /etc changes: 12 modified, 0 removed, 37 added
Transaction complete; bootconfig swap: yes deployment count change: 1
login as: root
Authenticating with public key "Internal" from agent
Last login: Sat May 30 10:34:19 2015 from 172.16.0.251
-bash-4.3# uname -a
Linux localhost.localdomain 4.0.2-300.fc22.x86_64 #1 SMP Thu May 7 16:05:02 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
-bash-4.3# ostree admin status
  fedora-atomic 11e146d457a55f531693f144d51a7b9cf2e905a0811b03340d7484a37fa7d421.0
    Version: 22.20
    origin refspec: fedora-atomic:fedora-atomic/f22/x86_64/docker-host
* fedora-atomic f59229a5923479ac913aa0442c4e93b6bad162496cd4e119232c7f6212bb2072.0
    Version: 22.15
    origin refspec: fedora-atomic:fedora-atomic/f22/x86_64/docker-host

Actual results:
After rebooting the system:

-bash-4.3# ostree admin status
  fedora-atomic 11e146d457a55f531693f144d51a7b9cf2e905a0811b03340d7484a37fa7d421.0
    Version: 22.20
    origin refspec: fedora-atomic:fedora-atomic/f22/x86_64/docker-host
* fedora-atomic f59229a5923479ac913aa0442c4e93b6bad162496cd4e119232c7f6212bb2072.0
    Version: 22.15
    origin refspec: fedora-atomic:fedora-atomic/f22/x86_64/docker-host

Expected results:
After rebooting the system:

-bash-4.3# ostree admin status
* fedora-atomic 11e146d457a55f531693f144d51a7b9cf2e905a0811b03340d7484a37fa7d421.0
    Version: 22.20
    origin refspec: fedora-atomic:fedora-atomic/f22/x86_64/docker-host
  fedora-atomic f59229a5923479ac913aa0442c4e93b6bad162496cd4e119232c7f6212bb2072.0
    Version: 22.15
    origin refspec: fedora-atomic:fedora-atomic/f22/x86_64/docker-host

Additional info:

Comment 1 Colin Walters 2015-05-31 15:36:36 UTC
https://github.com/GNOME/ostree/pull/116

Comment 2 Fedora Update System 2015-05-31 16:04:36 UTC
ostree-2015.6-2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/ostree-2015.6-2.fc22

Comment 3 Colin Walters 2015-05-31 16:42:10 UTC
This issue has apparently been lurking a long time.  The bug is clearly in OSTree.

But my current suspicion is that something changed in the kernel (filesystem/VFS) that changed the ordering from getdents(), and that's how it went undetected for so long.

You can run this script to check whether your system is affected:

cd
curl -O https://raw.githubusercontent.com/cgwalters/ostree/f952c0fcbc5f72f3ac03de8f881b3d8ac1c28dad/tests/grub2-entries-crosscheck.py
chmod a+x grub2-entries-crosscheck.py
./grub2-entries-crosscheck.py

To address the problem, we currently recommend editing /boot/grub2/grub.cfg and swapping the relevant `menuentry` components.  A script may be developed for this.

Comment 4 Fedora Update System 2015-06-01 17:10:02 UTC
Package ostree-2015.6-2.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ostree-2015.6-2.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-9288/ostree-2015.6-2.fc22
then log in and leave karma (feedback).

Comment 5 Todor Todorov 2015-06-02 07:43:39 UTC
This bug is related to Fedora-atomic which currently does not support package management with yum and rpm.
Yum does not exist at all.
Also, as I can see, yum is deprecated in Fedora 22.

I've tried to install the package via docker container.

-bash-4.3# docker run -ti --rm --privileged -v /:/chroot:rw fedora:22 dnf update -y http://ftp.linux.cz/pub/linux/fedora/linux/updates/testing/22/x86_64/o/ostree-2015.6-2.fc22.x86_64.rpm --installroot=/chroot
Last metadata expiration check performed 1:09:33 ago on Tue Jun  2 06:32:15 2015.
Dependencies resolved.
===========================================================================================================================================================================
 Package                              Arch                                 Version                                        Repository                                  Size
===========================================================================================================================================================================
Upgrading:
 ostree                               x86_64                               2015.6-2.fc22                                  @commandline                               308 k

Transaction Summary
===========================================================================================================================================================================
Upgrade  1 Package

Total size: 308 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Failed to obtain the transaction lock (logged in as: root).
Error: Could not run transaction.
-bash-4.3#


As I can see, I am hitting a bug related to a not released transaction lock:
https://bugzilla.redhat.com/show_bug.cgi?id=1204488


Currently can not verify whether Bug 1226520 has been fixed.
When do you expect to have the package added to Fedora-atomic tree?

Comment 6 Colin Walters 2015-06-02 18:37:09 UTC
(In reply to Todor Todorov from comment #5)
> 
> Failed to obtain the transaction lock (logged in as: root).
> Error: Could not run transaction.

I'm not sure what's going on there offhand, but I'd continue that conversation in the https://bugzilla.redhat.com/show_bug.cgi?id=1204488 bug.

It doesn't work to update ostree in a container, the host must be updated - which in this case obviously presents a circular problem.  That circle can be broken by manually editing the bootloader configuration.  We will also be producing new images.

> Currently can not verify whether Bug 1226520 has been fixed.
> When do you expect to have the package added to Fedora-atomic tree?

It's now available in updates-testing, see https://lists.projectatomic.io/projectatomic-archives/atomic/2015-June/msg00000.html

Comment 7 Todor Todorov 2015-06-04 21:56:09 UTC
I have installed Fedora-atomic 22.6 from updates-testing on 5 VMs.
Then upgraded to Fedora-atomic 22.7.
The boot order on all 5 VMs was correct after the upgrade.

* fedora-atomic 6c50aeae140a5284239d3f079b3f12bc6bbda7c462159234b4df0f9570df6fdd.0
    Version: 22.7
    origin refspec: fedora-atomic:fedora-atomic/f22/x86_64/testing/docker-host
  fedora-atomic 8448f343e0edd949d3d8bc81c01d3d8003ff779c9273f281395aeedba03c8735.0
    Version: 22.6
    origin refspec: fedora-atomic:fedora-atomic/f22/x86_64/testing/docker-host


Seems ostree-2015.6-2.fc22.x86_64 has resolved Bug 1226520.


Thank you very much for the assistance!

Comment 8 Colin Walters 2015-06-06 15:49:19 UTC
I've pushed:

So on an installed system, running:

# atomic run cgwalters/ostree-grub2-fix

should either validate or fix it.

Comment 9 Fedora Update System 2015-06-07 16:04:34 UTC
ostree-2015.6-2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Colin Walters 2015-07-21 18:01:05 UTC
The updates images available at http://atomic-nightly.cloud.fedoraproject.org/composes/
should have this patch as well.

Comment 11 Takashi Matsumura 2015-08-20 09:41:28 UTC
*** Bug 1254859 has been marked as a duplicate of this bug. ***


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