Bug 1333622 - There is some errors when using rhev-hypervisor7-ng.ks to install node: No valid layout found. Initialize if needed.
Summary: There is some errors when using rhev-hypervisor7-ng.ks to install node: No va...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: ovirt-node
Classification: oVirt
Component: Installation & Update
Version: master
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.0.0-beta
: ---
Assignee: Fabian Deutsch
QA Contact: wanghui
URL:
Whiteboard:
Depends On:
Blocks: ovirt-node-ng
TreeView+ depends on / blocked
 
Reported: 2016-05-06 02:39 UTC by wanghui
Modified: 2016-05-12 08:38 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-05-12 08:38:00 UTC
oVirt Team: Node
Embargoed:
fdeutsch: ovirt-4.0.0?
rule-engine: planning_ack?
rule-engine: devel_ack?
ycui: testing_ack+


Attachments (Terms of Use)
log files (deleted)
2016-05-06 02:39 UTC, wanghui
no flags Details
log file (2.44 KB, text/plain)
2016-05-06 09:24 UTC, wanghui
no flags Details
sosreport (5.63 MB, application/x-xz)
2016-05-06 10:43 UTC, wanghui
no flags Details

Description wanghui 2016-05-06 02:39:53 UTC
Description of problem:
There is some errors when using rhev-hypervisor7-ng.ks. Duing post-installation, there is an error when running imgbase and not vg is created.

Version-Release number of selected component (if applicable):
rhev-hypervisor7-ng-3.6-20160429.0
imgbased-0.6-0.1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install rhev-hypervisor7-ng-3.6-20160429.0 with rhev-hypervisor7-ng.ks as the kickstart file.
2. Check the #imgbase layout

Actual results:
1. Install rhev-hypervisor7-ng-3.6-20160429.0 with rhev-hypervisor7-ng.ks as the kickstart file.
2. Check the #imgbase layout

Actual results:
1. # imgbase layout
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/site-packages/imgbased/__main__.py", line 42, in <module>
    CliApplication()
  File "/usr/lib/python2.7/site-packages/imgbased/__init__.py", line 80, in CliApplication
    app.hooks.emit("post-arg-parse", args)
  File "/usr/lib/python2.7/site-packages/imgbased/hooks.py", line 120, in emit
    cb(self.context, *args)
  File "/usr/lib/python2.7/site-packages/imgbased/plugins/core.py", line 169, in check_argparse
    print(app.imgbase.layout())
  File "/usr/lib/python2.7/site-packages/imgbased/imgbase.py", line 131, in layout
    return self.naming.layout()
  File "/usr/lib/python2.7/site-packages/imgbased/naming.py", line 111, in layout
    raise RuntimeError("No valid layout found. Initialize if needed.")
RuntimeError: No valid layout found. Initialize if needed.

Expected results:
1. It should have the layout.

Additional info:

Comment 1 Fabian Deutsch 2016-05-06 08:56:29 UTC
Pelase attach the logfiles from the installation.

Comment 2 wanghui 2016-05-06 09:24:14 UTC
Created attachment 1154529 [details]
log file

Comment 3 wanghui 2016-05-06 10:43:54 UTC
Created attachment 1154575 [details]
sosreport

Comment 4 Fabian Deutsch 2016-05-09 12:43:59 UTC
Where did you get the kickstart from?

f it is the kcikstart from brew, then this is not a bug, because it is not intended to be used this way.

Comment 5 wanghui 2016-05-10 05:45:59 UTC
(In reply to Fabian Deutsch from comment #4)
> Where did you get the kickstart from?
> 
> f it is the kcikstart from brew, then this is not a bug, because it is not
> intended to be used this way.

Fabian,

Yes, I got this kickstart from brew. But although I do not use this kickstart, after installation, the #imgbase layout still has the same errors.  

Since we didn't know whether we can use the #imgbase layout to check the layout or not, can you explain me more about this?

And I also see the info from the ks-script-xxxx.log as follows.

[INFO] Factory: Copying /etc to /usr/share/factory//etc
[DEBUG] Running: ['ionice', 'rsync', '-pogAXtlHrx', '-Sc', '--no-i-r', '/etc/', '/usr/share/factory//etc']
[INFO] Factory: Copying /var to /usr/share/factory//var
[DEBUG] Running: ['ionice', 'rsync', '-pogAXtlHrx', '-Sc', '--no-i-r', '/var/', '/usr/share/factory//var']

It's there anything wrong with the path like '/usr/share/factory//etc' or '/usr/share/factory//var'?

Comment 6 Fabian Deutsch 2016-05-10 08:27:55 UTC
I can not answer your question, because I do not understand what you did.
Please describe your environment and the exact flow you did.

Comment 7 wanghui 2016-05-12 03:27:48 UTC
(In reply to Fabian Deutsch from comment #6)
> I can not answer your question, because I do not understand what you did.
> Please describe your environment and the exact flow you did.

Hi fabian,

There is some misunderstanding in this issue, let me explain more. Firstly, I just focus on imgbase checkout after installation. And there is nothing important related to ks file. I just run the command #imgbase --debug --experimental image-build --postprocess --set-nvr=$(rpm -q --qf "ovirt-node-ng-%{version}-0.$(date +%Y%m%d).0" redhat-release-rhev-hypervisor) which is come from ks file.

Test Scenario 1:

Test steps:
1. GUI install rhev-hypervisor7-ng-3.6-20160429.0
2. Check the layout in cmd

Test result:
1. # imgbase layout
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/site-packages/imgbased/__main__.py", line 42, in <module>
    CliApplication()
  File "/usr/lib/python2.7/site-packages/imgbased/__init__.py", line 80, in CliApplication
    app.hooks.emit("post-arg-parse", args)
  File "/usr/lib/python2.7/site-packages/imgbased/hooks.py", line 120, in emit
    cb(self.context, *args)
  File "/usr/lib/python2.7/site-packages/imgbased/plugins/core.py", line 169, in check_argparse
    print(app.imgbase.layout())
  File "/usr/lib/python2.7/site-packages/imgbased/imgbase.py", line 131, in layout
    return self.naming.layout()
  File "/usr/lib/python2.7/site-packages/imgbased/naming.py", line 111, in layout
    raise RuntimeError("No valid layout found. Initialize if needed.")
RuntimeError: No valid layout found. Initialize if needed.

Test scenario 2:
Test step:
1. Install rhev-hypervisor7-ng-3.6-20160429.0
2. Run command in node.
#imgbase --debug --experimental image-build --postprocess --set-nvr=$(rpm -q --qf "ovirt-node-ng-%{version}-0.$(date +%Y%m%d).0" redhat-release-rhev-hypervisor)

Test result:
1. # imgbase --debug --experimental image-build --postprocess --set-nvr=$(rpm -q --qf "ovirt-node-ng-%{version}-0.$(date +%Y%m%d).0" redhat-release-rhev-hypervisor)
[DEBUG] Arguments: Namespace(command='image-build', debug=True, experimental=True, postprocess=True, set_nvr='ovirt-node-ng-3.6-0.20160512.0', stream='Image')
[DEBUG] Operating on: <imgbased.imgbase.ImageLayers object at 0x7f462f0c58d0>
[DEBUG] Operating on: <imgbased.imgbase.ImageLayers object at 0x7f462f0c58d0>
[DEBUG] Operating on: <imgbased.imgbase.ImageLayers object at 0x7f462f0c58d0>
[INFO] Launching image post-processing
[INFO] Factory: Copying /etc to /usr/share/factory//etc
[DEBUG] Running: ['ionice', 'rsync', '-pogAXtlHrx', '-Sc', '--no-i-r', '/etc/', '/usr/share/factory//etc']
[INFO] Factory: Copying /var to /usr/share/factory//var
[DEBUG] Running: ['ionice', 'rsync', '-pogAXtlHrx', '-Sc', '--no-i-r', '/var/', '/usr/share/factory//var']
cannot delete non-empty directory: lib/rpm
could not make way for new symlink: lib/rpm
skipping non-regular file "lib/gssproxy/default.sock"
skipping non-regular file "lib/libvirt/qemu/channels/d3eb83d5-79b7-49f4-97c2-368389369d2e.com.redhat.rhevm.vdsm"
skipping non-regular file "lib/libvirt/qemu/channels/d3eb83d5-79b7-49f4-97c2-368389369d2e.org.ovirt.hosted-engine-setup.0"
skipping non-regular file "lib/libvirt/qemu/channels/d3eb83d5-79b7-49f4-97c2-368389369d2e.org.qemu.guest_agent.0"
skipping non-regular file "lib/libvirt/qemu/domain-HostedEngine/monitor.sock"
skipping non-regular file "spool/postfix/private/anvil"
skipping non-regular file "spool/postfix/private/bounce"
skipping non-regular file "spool/postfix/private/defer"
skipping non-regular file "spool/postfix/private/discard"
skipping non-regular file "spool/postfix/private/error"
skipping non-regular file "spool/postfix/private/lmtp"
skipping non-regular file "spool/postfix/private/local"
skipping non-regular file "spool/postfix/private/proxymap"
skipping non-regular file "spool/postfix/private/proxywrite"
skipping non-regular file "spool/postfix/private/relay"
skipping non-regular file "spool/postfix/private/retry"
skipping non-regular file "spool/postfix/private/rewrite"
skipping non-regular file "spool/postfix/private/scache"
skipping non-regular file "spool/postfix/private/smtp"
skipping non-regular file "spool/postfix/private/tlsmgr"
skipping non-regular file "spool/postfix/private/trace"
skipping non-regular file "spool/postfix/private/verify"
skipping non-regular file "spool/postfix/private/virtual"
skipping non-regular file "spool/postfix/public/cleanup"
skipping non-regular file "spool/postfix/public/flush"
skipping non-regular file "spool/postfix/public/pickup"
skipping non-regular file "spool/postfix/public/qmgr"
skipping non-regular file "spool/postfix/public/showq"
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/site-packages/imgbased/__main__.py", line 42, in <module>
    CliApplication()
  File "/usr/lib/python2.7/site-packages/imgbased/__init__.py", line 80, in CliApplication
    app.hooks.emit("post-arg-parse", args)
  File "/usr/lib/python2.7/site-packages/imgbased/hooks.py", line 120, in emit
    cb(self.context, *args)
  File "/usr/lib/python2.7/site-packages/imgbased/plugins/build.py", line 34, in check_argparse
    Postprocessor.postprocess(app)
  File "/usr/lib/python2.7/site-packages/imgbased/plugins/build.py", line 79, in postprocess
    func()
  File "/usr/lib/python2.7/site-packages/imgbased/plugins/build.py", line 88, in factorize_paths
    factorize("/var")
  File "/usr/lib/python2.7/site-packages/imgbased/plugins/build.py", line 52, in factorize
    rsync.sync(path, fpath)
  File "/usr/lib/python2.7/site-packages/imgbased/utils.py", line 752, in sync
    self._run(cmd)
  File "/usr/lib/python2.7/site-packages/imgbased/utils.py", line 736, in _run
    subprocess.check_call(cmd)
  File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ionice', 'rsync', '-pogAXtlHrx', '-Sc', '--no-i-r', '/var/', '/usr/share/factory//var']' returned non-zero exit status 23

Firstly, I think it should not trackback when no layer created in scenario 1. Secondly, maybe there is some error in scenario 2.

Comment 8 Fabian Deutsch 2016-05-12 08:38:00 UTC
(In reply to wanghui from comment #7)
> (In reply to Fabian Deutsch from comment #6)
> > I can not answer your question, because I do not understand what you did.
> > Please describe your environment and the exact flow you did.
> 
> Hi fabian,
> 
> There is some misunderstanding in this issue, let me explain more. Firstly,
> I just focus on imgbase checkout after installation. And there is nothing
> important related to ks file.

The correct working of imgbased depends on the correct installation.
And the correct installation absolutely depends on the kickstart.

If you want to test imgbased, then you need to ensure to perform a correct ngn installation.

The kickstart you used is not the right one.

> I just run the command #imgbase --debug
> --experimental image-build --postprocess --set-nvr=$(rpm -q --qf
> "ovirt-node-ng-%{version}-0.$(date +%Y%m%d).0"
> redhat-release-rhev-hypervisor) which is come from ks file.

You can not run this command after installation. It will have a different effect.

I am closing this bug, because the problem appeared in a flow which is absolutely not intended to be done.

If you want to do imgbased testing right, please speak to a der, to ensure that the testing method is correct. To repeat: The method above is not correct.


Note You need to log in before you can comment on or make changes to this bug.