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

Not every attributes exported for node definition #77

Closed
cxhong opened this issue Jul 19, 2018 · 4 comments
Closed

Not every attributes exported for node definition #77

cxhong opened this issue Jul 19, 2018 · 4 comments

Comments

@cxhong
Copy link
Contributor

cxhong commented Jul 19, 2018

I ran xcat-inventory command to export switch node defintion to yaml file, then import to another MN, a lot of attributes are miss

[root@boston01 xcatpost]# lsdef mid21
Object name: mid21
    groups=switch,mid_switch
    ip=172.17.21.100
    mac=24:8a:07:a6:15:88
    mgt=switch
    nodetype=switch
    password=admin
    postbootscripts=otherpkgs
    postscripts=syslog,remoteshell,syncfiles
    status=ip_configed
    switch=core01
    switchport=21
    switchtype=Mellanox
    usercomment=Mellanox MSX1410,MLNX-OS,SWv3.5.1006
    username=admin
[root@boston01 xcatpost]# xcat-inventory export -t node -o mid21 --format yaml > /tmp/mid21.yaml

[root@boston01 xcatpost]# sum /tmp/mid21.yaml
33604     1

import to boston36:

[root@boston36 p8le]# sum mid21.yaml
33604     1

[root@boston36 p8le]# xcat-inventory import -f ./mid21.yaml 
Importing object: mid21
Inventory import successfully!
[root@boston36 p8le]# lsdef mid21
Object name: mid21
    groups=switch,mid_switch
    ip=172.17.21.100
    mac=24:8a:07:a6:15:88
    postbootscripts=otherpkgs
    postscripts=syslog,remoteshell,syncfiles
    switchport=21
    usercomment=Mellanox MSX1410,MLNX-OS,SWv3.5.1006
@immarvin
Copy link
Contributor

hi @cxhong , the missing attributes are the attributes of groups mid_switch, lsdef inherits group attributes but xcat-inventory only exports the raw database data, it does not inherit the group attributes

we plan to add some kind of dependency between the objects like groups and nodes, and export/import the objects as well as their dependency objects.
will add a ticket to on this

@immarvin
Copy link
Contributor

the ticket is #78

@whowutwut
Copy link
Member

@immarvin If they are exported in the groups, we may be okay. We just need to export the correct groups and the attributes should be the same. We do want to preserve the groups in the export..

@robin2008
Copy link
Member

Close it first unless we found the real missing attribute.

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