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

Some issues with xcat-inventory importing and exporting... #96

Open
whowutwut opened this issue Aug 21, 2018 · 3 comments
Open

Some issues with xcat-inventory importing and exporting... #96

whowutwut opened this issue Aug 21, 2018 · 3 comments
Milestone

Comments

@whowutwut
Copy link
Member

whowutwut commented Aug 21, 2018

Some issues seen....

I can export xcatdefaults, import and then delete

When exporting xcat-inventory export -t node it includes xcatdefults which normally does not display in lsdef -t groups After importing, I can now delete the xcatdefaults group and my postscripts are missing default postscripts

Many more objects are exported than are seen in lsdef

Somehow there is some meta data left around.

You can see this on boston01 ,, if you do xcat-inventory export -t node and compare the output with what you can see with xCAT commmands.

Disabled objects are not represented correctly

I disabled this object by doing tabedit... and set 1 at the end:

[root@boston01 ~]# tabdump nodelist | grep cn05
"mid21tor24cn05","ib0_regex","booted","04-10-2018 16:08:17",,,,,,,,"machine moved out of frame, IST borrowing","1"
[root@boston01 ~]#

But when exporting it, it shows up with obj_type: group instead of node

[root@boston01 ~]# xcat-inventory export -t node -o mid21tor24cn05 --format=yaml
node:
  mid21tor24cn05:
    device_info:
      arch: ppc64le
      characteristics: mp
      cpucount: '160'
      cputype: POWER8NVL (raw), altivec supported
      disksize: sda:932GB,sdb:932GB
      memory: 261490MB
      mtm: 8335-GTB
      serial: 2109D0A
      supportedarchs: ppc64
      uuid: 8335-gtb-2109d0a-98be9405d780
    device_type: server
    engines:
      console_engine:
        engine_info:
          consoleenabled: '1'
      netboot_engine:
        engine_info:
          chain: runcmd=bmcsetup,osimage=rhels7.5-snap2-ppc64le-ANSIBLE-netboot-compute
          osimage: rhels7.5-alt-rc2-ppc64le-netboot-compute
        engine_type: petitboot
    network_info:
      primarynic:
        mac:
        - 70:e2:84:14:0c:c9
    obj_type: group
    role: compute
schema_version: '1.0'

Then when I import, it, it shows up as a group:

[root@boston36 p8le]# lsdef -t group mid21tor24cn05
Object name: mid21tor24cn05
    arch=ppc64le
    consoleenabled=1
    cpucount=160
    cputype=POWER8NVL (raw), altivec supported
    disksize=sda:932GB,sdb:932GB
    mac=70:e2:84:14:0c:c9
    members=
    memory=261490MB
    mtm=8335-GTB
    netboot=petitboot
    nodetype=mp
    provmethod=rhels7.5-alt-rc2-ppc64le-netboot-compute
    serial=2109D0A
    supportedarchs=ppc64

[root@boston36 p8le]# nodels | grep mid21tor24cn05
[root@boston36 p8le]#
@immarvin
Copy link
Contributor

Hi @whowutwut , I think the orphan objects are imported to be a group is a problem, I will take a look at this.

@gurevichmark opened a ticket on this before #85

on xcatdefaults, there is a request from CORAL to make it to be a object , see xcat2/xcat-core#1919

Disabled objects are not represented correctly, currently, xcat-inventory will not ignore the disabled entries during export, so the disabled entry in nodelist for mid21tor24cn05 will not be used to compose the object yaml during export, and the criteria to determine whether the obj_type of node object yaml is a group or node, is based on whether there is an entry in nodelist, hence it is exported as a group. will look to find any better solution for this

@whowutwut
Copy link
Member Author

whowutwut commented Aug 23, 2018

Is there a way to indicate that the object is disabled and it will be imported back as disabled also? There may be case where we want to use this as back up the database but also do not change the end result when imported...

@immarvin
Copy link
Contributor

will consider this, the difficulty is that the disbled table entries create a partial object, how to differentiate the disabled attribute and other attributes

@immarvin immarvin added this to the 2.14.4 milestone Sep 11, 2018
@zet809 zet809 modified the milestones: 2.14.4, 2.14.5 Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants