From 0e37f52c41945cde4bdabd649c8cee5e2e03fa3c Mon Sep 17 00:00:00 2001 From: adorsey-NOAA Date: Tue, 9 Nov 2021 12:00:35 -0500 Subject: [PATCH] Fix litefile entries for osimages with groups Before this change, any `osimage` with the `groups` parameter defined to anything but `ALL` would not get entries set for `ALL` in the `litefile` table. The only special case for images with `groups` should be the group-specific entries. --- xCAT-server/lib/xcat/plugins/litetree.pm | 25 ++++++++++-------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/litetree.pm b/xCAT-server/lib/xcat/plugins/litetree.pm index e6a7a1f78..e7cd01024 100644 --- a/xCAT-server/lib/xcat/plugins/litetree.pm +++ b/xCAT-server/lib/xcat/plugins/litetree.pm @@ -344,25 +344,20 @@ sub getNodeData { my $imagegroups = $osimagetab->getAttribs({ imagename => $image }, @imagegroupsattr); if ($imagegroups and $imagegroups->{groups}) { - # get the directories with no names - push @imageInfo, $tab->getAttribs({ image => '' }, @attrs); - # get for the image groups specific directories push @imageInfo, $tab->getAttribs({ image => $imagegroups->{groups} }, @attrs); - # get for the image specific directories - push @imageInfo, $tab->getAttribs({ image => $image }, @attrs); - } else { - - # get the directories with no names - push @imageInfo, $tab->getAttribs({ image => '' }, @attrs); - - # get the ALL directories - push @imageInfo, $tab->getAttribs({ image => 'ALL' }, @attrs); - - # get for the image specific directories - push @imageInfo, $tab->getAttribs({ image => $image }, @attrs); } + # These cases should run for all images + # get the directories with no names + push @imageInfo, $tab->getAttribs({ image => '' }, @attrs); + + # get the ALL directories + push @imageInfo, $tab->getAttribs({ image => 'ALL' }, @attrs); + + # get for the image specific directories + push @imageInfo, $tab->getAttribs({ image => $image }, @attrs); + } # pass back a reference to the directory