Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after pinning single deployment all future deployments are pinned #1595

Closed
dustymabe opened this issue May 22, 2018 · 2 comments
Closed

after pinning single deployment all future deployments are pinned #1595

dustymabe opened this issue May 22, 2018 · 2 comments
Labels

Comments

@dustymabe
Copy link
Contributor

After pinning single deployment all future deployments are pinned.

versions: ostree-2018.5-1.fc28.x86_64 rpm-ostree-2018.5-1.fc28.x86_64

I started at f28 atomic

[vagrant@vanilla-f28-atomic ~]$ sudo rpm-ostree status                                                               
State: idle; auto updates disabled                                                                                   
Deployments:                                                                                                         
● ostree://fedora-atomic:fedora/28/x86_64/atomic-host                                                                
                   Version: 28.20180515.1 (2018-05-15 16:32:35)                                                      
                    Commit: a29367c58417c28e2bd8306c1f438b934df79eba13706e078fe8564d9e0eb32b
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1

I pinned that deployment:

[vagrant@vanilla-f28-atomic ~]$ sudo ostree admin pin 0                                                              
                                                                                                                     
Deployment is now pinned                                                                                             
[vagrant@vanilla-f28-atomic ~]$ sudo rpm-ostree status                                      
State: idle; auto updates disabled                                                                                   
Deployments:                                                                                                         
● ostree://fedora-atomic:fedora/28/x86_64/atomic-host                                                                
                   Version: 28.20180515.1 (2018-05-15 16:32:35)                                                      
                    Commit: a29367c58417c28e2bd8306c1f438b934df79eba13706e078fe8564d9e0eb32b                         
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1     
                    Pinned: yes

I rebased to updates ref and rebooted:

[vagrant@vanilla-f28-atomic ~]$ sudo rpm-ostree status
State: idle; auto updates disabled
Deployments:
● ostree://fedora-atomic:fedora/28/x86_64/updates/atomic-host
                   Version: 28.20180522.0 (2018-05-22 14:14:12)
                    Commit: 64f02a95ac73227b9e3de3b0a849fd9fc13fdc6934049519051386495d151461
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
                    Pinned: yes

  ostree://fedora-atomic:fedora/28/x86_64/atomic-host
                   Version: 28.20180515.1 (2018-05-15 16:32:35)
                    Commit: a29367c58417c28e2bd8306c1f438b934df79eba13706e078fe8564d9e0eb32b
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
                    Pinned: yes

Note both deployments say they are pinned. I then rebase to testing ref and reboot:

[root@vanilla-f28-atomic ~]# rpm-ostree status
State: idle; auto updates disabled                                        
Deployments:                                                            
● ostree://fedora-atomic:fedora/28/x86_64/testing/atomic-host
                   Version: 28.20180522.0 (2018-05-22 15:09:59)
                    Commit: cb95ddb3cf5ea8eeac56a9ad87be5fe44dbc8efb17ae4cde536eda271c594002
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
                    Pinned: yes      
                                        
  ostree://fedora-atomic:fedora/28/x86_64/updates/atomic-host
                   Version: 28.20180522.0 (2018-05-22 14:14:12)
                    Commit: 64f02a95ac73227b9e3de3b0a849fd9fc13fdc6934049519051386495d151461
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
                    Pinned: yes
                                                             
  ostree://fedora-atomic:fedora/28/x86_64/atomic-host          
                   Version: 28.20180515.1 (2018-05-15 16:32:35)                             
                    Commit: a29367c58417c28e2bd8306c1f438b934df79eba13706e078fe8564d9e0eb32b
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
                    Pinned: yes

I then deployed one more commit (the previous ref in the testing stream) so we could get one more deployment:

[root@vanilla-f28-atomic ~]# rpm-ostree deploy b932fcb3eed5b4b09f7664d22bd61b92a2bd7432e313006273367fe8bbc4b26e
Validating checksum 'b932fcb3eed5b4b09f7664d22bd61b92a2bd7432e313006273367fe8bbc4b26e'
1 metadata, 0 content objects fetched; 569 B transferred in 1 seconds
55 metadata, 30 content objects fetched; 72414 KiB transferred in 8 seconds
Copying /etc changes: 21 modified, 0 removed, 57 added         
Transaction complete; bootconfig swap: yes; deployment count change: 1                      
Freed: 194.8 kB (pkgcache branches: 0)                                                 
Downgraded:                             
  container-selinux 2:2.60-1.git97f8dfc.fc28 -> 2:2.58-1.gitd213769.fc28
  fedora-gpg-keys 28-3 -> 28-2                       
  fedora-repos 28-3 -> 28-2                                    
  glib-networking 2.56.1-1.fc28 -> 2.56.0-1.fc28                                            
  kernel 4.16.10-300.fc28 -> 4.16.9-300.fc28                                           
  kernel-core 4.16.10-300.fc28 -> 4.16.9-300.fc28
  kernel-modules 4.16.10-300.fc28 -> 4.16.9-300.fc28
  podman 0.5.3-2.gitdc3f9df.fc28 -> 0.5.2-1.git4631586.fc28
  publicsuffix-list-dafsa 20180514-1.fc28 -> 20180419-1.fc28              
  quota 1:4.04-6.fc28 -> 1:4.04-5.fc28                                  
  quota-nls 1:4.04-6.fc28 -> 1:4.04-5.fc28                   
  tzdata 2018e-1.fc28 -> 2018d-1.fc28                          
Run "systemctl reboot" to start a reboot                                                    
[root@vanilla-f28-atomic ~]# rpm-ostree status                                         
State: idle; auto updates disabled   
Deployments:                            
  ostree://fedora-atomic:fedora/28/x86_64/testing/atomic-host
                   Version: 28.20180521.0 (2018-05-21 15:24:31)
                    Commit: b932fcb3eed5b4b09f7664d22bd61b92a2bd7432e313006273367fe8bbc4b26e
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
                    Pinned: yes
                                                             
● ostree://fedora-atomic:fedora/28/x86_64/testing/atomic-host  
                   Version: 28.20180522.0 (2018-05-22 15:09:59)                             
                    Commit: cb95ddb3cf5ea8eeac56a9ad87be5fe44dbc8efb17ae4cde536eda271c594002
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
                    Pinned: yes
                                                     
  ostree://fedora-atomic:fedora/28/x86_64/updates/atomic-host  
                   Version: 28.20180522.0 (2018-05-22 14:14:12)                             
                    Commit: 64f02a95ac73227b9e3de3b0a849fd9fc13fdc6934049519051386495d151461
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
                    Pinned: yes
                                                                                           
  ostree://fedora-atomic:fedora/28/x86_64/atomic-host                             
                   Version: 28.20180515.1 (2018-05-15 16:32:35)
                    Commit: a29367c58417c28e2bd8306c1f438b934df79eba13706e078fe8564d9e0eb32b
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1              
                    Pinned: yes

I guess the problem is related to the fact that I only pinned one deployment but all of them are pinned. Is that expected behavior?

I actually like this feature (i.e. pin everything for me), but I don't think this is what someone would expect and would possibly lead to disk space issues.

@jlebon jlebon added the bug label May 22, 2018
jlebon added a commit to jlebon/rpm-ostree that referenced this issue May 22, 2018
With the new support for pinning deployments, we need to also update
rpm-ostree to clean up the transient state as is now done in the ostree
sysroot upgrader.

This addresses that issue as well as tries to be a little cleaner in how
we clean up other transient state. Notably, we add a new helper function
to `RpmOstreeOrigin` to do this for us and use it in the upgrader. In
other cases, we do want this transient information since it allows us to
describe the deployment.

Closes: ostreedev/ostree#1595
@jlebon
Copy link
Member

jlebon commented May 22, 2018

Ahh OK, so this is indeed an rpm-ostree issue. We just never taught rpm-ostree to drop the transient keys like ostree learned in #1464. I'm fine just leaving it here though -- I opened coreos/rpm-ostree#1372.

jlebon added a commit to jlebon/rpm-ostree that referenced this issue May 22, 2018
With the new support for pinning deployments, we need to also update
rpm-ostree to clean up the transient state as is now done in the ostree
sysroot upgrader.

This addresses that issue as well as tries to be a little cleaner in how
we clean up other transient state. Notably, we add a new helper function
to `RpmOstreeOrigin` to do this for us and use it in the upgrader. In
other cases, we do want this transient information since it allows us to
describe the deployment.

Closes: ostreedev/ostree#1595
@cgwalters
Copy link
Member

This is an rpm-ostree bug, AFAIK the raw ostree bits work. Let's track it via the PR jlebon opened. When I was implementing this I had only tested with ostree unfortunately.

jlebon added a commit to jlebon/rpm-ostree that referenced this issue May 23, 2018
With the new support for pinning deployments, we need to also update
rpm-ostree to clean up the transient state as is now done in the ostree
sysroot upgrader.

This addresses that issue as well as tries to be a little cleaner in how
we clean up other transient state. Notably, we add a new helper function
to `RpmOstreeOrigin` to do this for us and use it in the upgrader. In
other cases, we do want this transient information since it allows us to
describe the deployment.

Closes: ostreedev/ostree#1595
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this issue May 23, 2018
With the new support for pinning deployments, we need to also update
rpm-ostree to clean up the transient state as is now done in the ostree
sysroot upgrader.

This addresses that issue as well as tries to be a little cleaner in how
we clean up other transient state. Notably, we add a new helper function
to `RpmOstreeOrigin` to do this for us and use it in the upgrader. In
other cases, we do want this transient information since it allows us to
describe the deployment.

Closes: ostreedev/ostree#1595

Closes: #1372
Approved by: cgwalters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants