Menu

#4349 [dev]after rmkit/rmkitcomp -i kitcomp list, kitrepo dir in otherpkgdir is not deleted

2.9.1
pending
None
kits
5
2015-03-10
2014-10-31
BaiYuan
No

If kitcomps in kitcomponent list are not used by other osimage,but they are dependency,after rmkitcomp -i osimage kitcomplist, kitrepo dir under otherpkgdir is not removed from otherpkgdir;
For example:
/ppc64el# addkitcomp -a -i ubuntu14.04-ppc64el-netboot-compute xlf.rte-compute-15.1.1-0-ubuntu-14.04-ppc64el

root@p1vm03:/install/post/otherpkgs/ubuntu14.04/ppc64el# lsdef -t osimage ubuntu14.04-ppc64el-netboot-compute
Object name: ubuntu14.04-ppc64el-netboot-compute
exlist=/opt/xcat/share/xcat/netboot/ubuntu/compute.exlist
imagetype=linux
kitcomponents=xlf.license-compute-15.1.1-0-ubuntu-14.04-ppc64el,xlf.rte-compute-15.1.1-0-ubuntu-14.04-ppc64el
osarch=ppc64el
osname=Linux
osvers=ubuntu14.04
otherpkgdir=/install/post/otherpkgs/ubuntu14.04/ppc64el
otherpkglist=/install/osimages/ubuntu14.04-ppc64el-netboot-compute/kits/KIT_DEPLOY_PARAMS.otherpkgs.pkglist,/install/osimages/ubuntu14.04-ppc64el-netboot-compute/kits/KIT_COMPONENTS.otherpkgs.pkglist
permission=755
pkgdir=/install/ubuntu14.04/ppc64el
pkglist=/opt/xcat/share/xcat/netboot/ubuntu/compute.ubuntu14.04.ppc64el.pkglist
postinstall=/install/osimages/ubuntu14.04-ppc64el-netboot-compute/kits/KIT_COMPONENTS.postinstall
profile=compute
provmethod=netboot
rootimgdir=/install/netboot/ubuntu14.04/ppc64el/compute

root@p1vm03:/install/post/otherpkgs/ubuntu14.04/ppc64el# rmkitcomp -i ubuntu14.04-ppc64el-netboot-compute xlf.rte-compute-15.1.1-0-ubuntu-14.04-ppc64el,xlf.license-compute-15.1.1-0-ubuntu-14.04-ppc64el
Removing kitcomponent xlf.rte-compute-15.1.1-0-ubuntu-14.04-ppc64el from osimage ubuntu14.04-ppc64el-netboot-compute
Removing kitcomponent xlf.license-compute-15.1.1-0-ubuntu-14.04-ppc64el from osimage ubuntu14.04-ppc64el-netboot-compute
kitcomponents xlf.rte-compute-15.1.1-0-ubuntu-14.04-ppc64el,xlf.license-compute-15.1.1-0-ubuntu-14.04-ppc64el were removed from osimage ubuntu14.04-ppc64el-netboot-compute successfully

root@p1vm03:/install/post/otherpkgs/ubuntu14.04/ppc64el# ls
xlf-15.1.1-0-ubuntu-14.04-ppc64el ============================> did not delete kitrepo dir;
root@p1vm03:/install/post/otherpkgs/ubuntu14.04/ppc64el# pwd
/install/post/otherpkgs/ubuntu14.04/ppc64el

Discussion

  • BaiYuan

    BaiYuan - 2014-10-31
    • status: open --> pending
     
  • BaiYuan

    BaiYuan - 2014-10-31

    fixed in 2.9:

    commit ec1ef81ea8f44807c07118872aabb43372907972

     
  • Anonymous

    Anonymous - 2014-12-01

    This fix is not fully correct, and needs an additional test.

    If you do
    rmkitcomp -i myimage mykitcomponent

    Even if other osimages may be using kitcomponents from 'mykit', as long as they are not using the same otherpkgdir used by myimage, the directory should be removed from the myimage otherpkgdir.

    For example, if I have:

    # lsdef -t osimage linda-install-compute,linda-netboot-compute -i otherpkgdir,kitcomponents
    Object name: linda-install-compute
        kitcomponents=linda-compute-1.0-1-ubuntu-14.04-ppc64le
        otherpkgdir=/install/post/otherpkgs/linda
    Object name: linda-netboot-compute
        kitcomponents=linda-compute-1.0-1-ubuntu-14.04-ppc64le
        otherpkgdir=/install/post/otherpkgs/ubuntu14.04/ppc64el
    

    When I do:

    # rmkitcomp -i linda-install-compute linda-compute-1.0-1-ubuntu-14.04-ppc64le
    Removing kitcomponent linda-compute-1.0-1-ubuntu-14.04-ppc64le from osimage linda-install-compute
    kitcomponents linda-compute-1.0-1-ubuntu-14.04-ppc64le were removed from osimage linda-install-compute successfully
    
    # ls /install/post/otherpkgs/linda
    linda-1.0-1-ubuntu-14.04-ppc64le
    

    I should have seen the directory removed from my otherpkgsdir since the only osimage needing it in that directory is linda-install-compute. Even though the osimage linda-netboot-compute is using the same kitcomponent, it is NOT using the same directory.

     
  • Anonymous

    Anonymous - 2014-12-01
    • status: pending --> open
     
  • BaiYuan

    BaiYuan - 2014-12-02
    • 2.10: 2.9 --> 2.9.1
     
  • BaiYuan

    BaiYuan - 2014-12-02

    Since 2.9 will be GA, this defect can be moved to 2.9.1;

     
  • BaiYuan

    BaiYuan - 2014-12-02
    • assigned_to: BaiYuan --> Linda Mellor
     
  • Guang Cheng Li

    Guang Cheng Li - 2015-03-09

    Linda, will this bug be fixed in 2.9.1?

     
  • Guang Cheng Li

    Guang Cheng Li - 2015-03-09
     
  • Anonymous

    Anonymous - 2015-03-10

    Fixed. Also fixed typo in Schema.pm to now have lsdef display kitcomponent reponame correctly.

    c8927f8 2.9
    8f90acc master

     
  • Anonymous

    Anonymous - 2015-03-10
    • status: open --> pending
     
  • Anonymous

    Anonymous - 2015-03-10

    bad fix. updated again:
    22e89bd 2.9
    d009a51 master

     
MongoDB Logo MongoDB