Project

General

Profile

Actions

Bug #13451

closed

beadm needs to do more with temporary BE activation

Added by Andy Fiddaman 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

beadm should remove any temporary BE activation when a BE is deleted, and should properly account for renames.

For example, here's what happens now with delete and re-create:

bloody# beadm list
BE           Active Mountpoint Space   Policy Created
20210107     NR     /          131.89G static 2021-01-07 23:59
bloody# beadm create bob
Created successfully
bloody# beadm activate -t bob
Activated successfully
bloody# beadm list
BE           Active Mountpoint Space   Policy Created
20210107     NR     /          131.89G static 2021-01-07 23:59
bob          T      -          1.92M   static 2021-01-13 12:08
bloody# beadm destroy -Ffs bob
Destroyed successfully
bloody# beadm create bob
Created successfully
bloody# beadm list
BE           Active Mountpoint Space   Policy Created
20210107     NR     /          131.89G static 2021-01-07 23:59
bob          T      -          1.75M   static 2021-01-13 12:08
Actions #1

Updated by Andy Fiddaman 4 months ago

Also, this causes a hang, requiring a power cycle

beadm create bob
beadm activate -t bob
beadm destroy bob
init 6
Actions #2

Updated by Andy Fiddaman 4 months ago

  • Subject changed from beadm needs to do more with temporary BE activation to beadm needs to do more with temporary BE activation
Actions #3

Updated by Electric Monk 4 months ago

  • Gerrit CR set to 1167
Actions #4

Updated by Andy Fiddaman 4 months ago

Testing, with the patch in the attached Gerrit review:

bloody# eeprom -bp
nvlist version: 0
        version = 0x1
        illumos:bootonce = zfs:rpool/ROOT/bob:
bloody# beadm destroy bob
Destroyed successfully
bloody# eeprom -bp
nvlist version: 0
        version = 0x1

bloody# eeprom -bp
nvlist version: 0
        version = 0x1
        illumos:bootonce = zfs:rpool/ROOT/bob:
bloody# beadm rename bob freda
Renamed successfully
bloody# eeprom -bp
nvlist version: 0
        version = 0x1
        illumos:bootonce = zfs:rpool/ROOT/freda:
bloody# beadm create -t gop
Activated successfully
bloody# eeprom -bp
nvlist version: 0
        version = 0x1
        illumos:bootonce = zfs:rpool/ROOT/gop:
Actions #5

Updated by Electric Monk 4 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit f976337ad91e7232287bf3bc0e038987a11a8949

commit  f976337ad91e7232287bf3bc0e038987a11a8949
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2021-01-19T22:23:24.000Z

    13451 beadm needs to do more with temporary BE activation
    Reviewed by: C Fraire <cfraire@me.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Actions

Also available in: Atom PDF