Rocky Installation on Windows can't end in create-base process

Bug #1800975 reported by xavior
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-training-labs
Fix Released
Critical
Roger Luethi

Bug Description

I am trying to install the training labs on my windows laptop (windows 7 64 bit with 8G ram). In the second script, the os installation was completed correctly, but the cmd windows won't close. The Ubuntu VM seems to be running properly, which show me a login prompt. I have tried 3 times, each time it lasted 40-50 minutes. Please help me get through this problem. Thank you!

Revision history for this message
Roger Luethi (rl-o) wrote :

Take a look at the log directory. What are the last log files? Is there anything in there that might indicate an error?

Changed in labs:
assignee: nobody → Roger Luethi (rl-o)
Revision history for this message
xavior (erikxia) wrote :

The log directory is empty.

Revision history for this message
Roger Luethi (rl-o) wrote :

Where did you get the scripts? Which version?

Revision history for this message
xavior (erikxia) wrote :
Download full text (70.9 KiB)

I get them from https://docs.openstack.org/training_labs/

I patste it below

@ECHO OFF

REM This is an automatically generated Windows batch file. It creates the
REM base disk for an OpenStack training-labs setup.

SETLOCAL ENABLEDELAYEDEXPANSION

ECHO.
ECHO OpenStack labs for VirtualBox on Windows
ECHO Generated by osbash
ECHO.
ECHO Create base disk
ECHO.

REM vim: set ai ts=4 sw=4 et ft=dosbatch:

REM Load likely VBoxManage location from configuration file
CALL "%~dp0\CONFIG.BAT"

IF EXIST "%VBM%" GOTO vbm_found

REM Before searching, try a likely alternative

SET VBM=d:\Program Files\Oracle\VirtualBox\VBoxManage.exe

IF EXIST "%VBM%" GOTO vbm_found

ECHO.
ECHO %time% Searching %SystemDrive% for VBoxManage, this may take a while
ECHO.
ECHO To skip the search process and speed up script execution, edit
ECHO config.bat so that VBM contains the full path to VBoxManage.exe.
ECHO.

FOR /r %SystemDrive%\ %%a IN (*) DO (
    IF "%%~nxa"=="VBoxManage.exe" SET VBM=%%~dpnxa && GOTO vbm_found
)

ECHO.
ECHO %time% Cannot find VBoxManage.exe (part of VirtualBox) on %SystemDrive%.

ECHO.
ECHO %time% Searching D: for VBoxManage, this may take a while
ECHO.

FOR /r D:\ %%a IN (*) DO (
    IF "%%~nxa"=="VBoxManage.exe" SET VBM=%%~dpnxa && GOTO vbm_found
)

ECHO.
ECHO %time% Cannot find VBoxManage.exe (part of VirtualBox) on D:.
ECHO %time% Giving up. Program stops.
ECHO.
GOTO :terminate

:vbm_found
ECHO VBoxManage.exe found:
ECHO "%VBM%"
ECHO Version:
"%VBM%" --version

REM vim: set ai ts=4 sw=4 et ft=dosbatch:

SET BATDIR=%~dp0
PUSHD %BATDIR%..
SET TOPDIR=%cd%
POPD

SET AUTODIR=%TOPDIR%\autostart
SET IMGDIR=%TOPDIR%\img
SET LOGDIR=%TOPDIR%\log
SET STATUSDIR=%TOPDIR%\log\status
SET SHAREDIR=%TOPDIR%
SET TOOLSDIR=%TOPDIR%\tools

ECHO %time% Creating directories (if needed)
IF NOT EXIST %AUTODIR% mkdir %AUTODIR%
IF NOT EXIST %IMGDIR% mkdir %IMGDIR%
IF NOT EXIST %LOGDIR% mkdir %LOGDIR%
IF NOT EXIST %SHAREDIR% mkdir %SHAREDIR%

REM vim: set ai ts=4 sw=4 et ft=dosbatch:

ECHO %time% Cleaning up autostart and log directories
DEL /S /Q %AUTODIR%
DEL /S /Q %LOGDIR%

ECHO %time% Looking for %IMGDIR%\ubuntu-18.04.1-server-amd64.iso
IF EXIST %IMGDIR%\ubuntu-18.04.1-server-amd64.iso goto got_install_iso

ECHO.
ECHO ubuntu-18.04.1-server-amd64.iso not found in %IMGDIR%.
ECHO.
ECHO Trying to download the install ISO from
ECHO http://cdimage.ubuntu.com/releases/18.04/release/ubuntu-18.04.1-server-amd64.iso
ECHO.
ECHO Expect this to take several minutes or longer, depending on your
ECHO Internet connection.
ECHO.
cscript /nologo %TOOLSDIR%\downloader.js http://cdimage.ubuntu.com/releases/18.04/release/ubuntu-18.04.1-server-amd64.iso
RENAME downloaded.bin ubuntu-18.04.1-server-amd64.iso
MOVE ubuntu-18.04.1-server-amd64.iso %IMGDIR%
IF EXIST %IMGDIR%\ubuntu-18.04.1-server-amd64.iso goto got_install_iso
ECHO.
ECHO ubuntu-18.04.1-server-amd64.iso still not found in %IMGDIR%.
ECHO Aborting.
ECHO.

goto :terminate

:got_install_iso
ECHO.
ECHO %time% Found %IMGDIR%\ubuntu-18.04.1-server-amd64.iso
ECHO.
ECHO %time% Initialization done. Hit any key to continue.
ECHO.
PAUSE

REM vim: set ai ts=4 sw=4 et ft=dosbatch:

IF EXIST %IMGDIR%\tmp-disk.vdi DEL %IMGDIR%\tmp-disk.vdi
CALL :vm...

Revision history for this message
xavior (erikxia) wrote :

I feel this step has not been completed,

MOVE /y %IMGDIR%\tmp-disk.vdi %IMGDIR%\base-shared_folder-rocky-ubuntu-18.04-amd64.vdi

because I can't find the img file named base-shared_folder-rocky-ubuntu-18.04-amd64.vdi in the img directory, but find the img file named tmp-disk.vdi

Revision history for this message
Roger Luethi (rl-o) wrote :

Seems to be Rocky. I need to take a look.

Revision history for this message
Roger Luethi (rl-o) wrote :

Thanks for reporting the issue. I think I know what happened. For now, you can try the Queens release, that should work. Rocky works on Linux and macOS, but Windows needs fixing.

Changed in labs:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
xavior (erikxia) wrote :

Thanks! I have tried the Queens release, the second script runs well, but the third script is not so lucky, it reported an error and exited. I run these scripts on Ubuntu quite well. I am sorry for not recording the error messgae, it seems that something wrong when it creates a virtual network.

Revision history for this message
xavior (erikxia) wrote :

I have tried it again, this time I captured the error messages in log files as follows.

Sat Nov 3 03:05:33 UTC 2018 done
Sat Nov 3 03:05:33 UTC 2018 start /osbash/autostart/01_config_private_network.sh
Sat Nov 3 03:10:38 UTC 2018 ERROR: status 1 for /osbash/autostart/01_config_private_network.sh
Script returned with error, giving up.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to training-labs (master)

Fix proposed to branch: master
Review: https://review.openstack.org/615374

Changed in labs:
status: Confirmed → In Progress
Revision history for this message
Roger Luethi (rl-o) wrote : Re: Intallation cant end in create-base process

Now there should be log files in the log directory. The last one should have 01_config_private_network as part of its name. What does that log file say?

Revision history for this message
xavior (erikxia) wrote :
Download full text (7.3 KiB)

It says :
Waiting for first DHCP namespace.
Waiting for first bridge to show up.
Waiting for neutron to come up.
Sourcing the demo credentials.
Creating the private network.
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2018-11-03T03:05:45Z |
| description | |
| dns_domain | None |
| id | d1f92b8c-c1f5-497f-affc-61769f043f0c |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | False |
| is_vlan_transparent | None |
| mtu | 1450 |
| name | selfservice |
| port_security_enabled | True |
| project_id | 273f3eecb37b4deb84913598ebca639f |
| provider:network_type | None |
| provider:physical_network | None |
| provider:segmentation_id | None |
| qos_policy_id | None |
| revision_number | 2 |
| router:external | Internal |
| segments | None |
| shared | False |
| status | ACTIVE |
| subnets | |
| tags | |
| updated_at | 2018-11-03T03:05:45Z |
+---------------------------+--------------------------------------+
Creating a subnet on the private network.
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| allocation_pools | 172.16.1.2-172.16.1.254 |
| cidr | 172.16.1.0/24 |
| created_at | 2018-11-03T03:05:48Z |
| description | |
| dns_nameservers | 8.8.4.4 |
| enable_dhcp | True |
| gateway_ip | 172.16.1.1 |
| host_routes | |
| id | 05ee8d0d-7bdd-400c-bce5-e7bbf5be9bf1 |
| ip_version | 4 |
| ipv6_address_mode | None ...

Read more...

Revision history for this message
Roger Luethi (rl-o) wrote :

Very odd, that should not happen. Have you seen that more than once? If not, try rebuilding the cluster after removing all the VMs. I will have to try to reproduce it later this weekend.

Revision history for this message
Roger Luethi (rl-o) wrote :

I have been unable to reproduce this with the Queens training-labs on Windows 10. It worked without an error. I am trying Windows 7 now.

Revision history for this message
Roger Luethi (rl-o) wrote :

Same on Windows 7. Queens installs without any errors. I tested it on systems with 16 GB RAM, but I don't see how that would make a difference at the point where you encountered the error. So I assume it is not something that can be reproduced.

summary: - Intallation cant end in create-base process
+ Installation can't end in create-base process
summary: - Installation can't end in create-base process
+ Rocky Installation on Windows can't end in create-base process
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to training-labs (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/615407

Revision history for this message
xavior (erikxia) wrote :

Thank you, I have successfully installed the training labs (queens version). I removed the virtualbox completely and reinstalled it again, then clear all setting files related with the vbox. Finally, the 3 scripts exceute smoothly. So, there is no bug in queens version script of openstack training labs (for windows). Thanks a lot!

Revision history for this message
Roger Luethi (rl-o) wrote :

Good to hear it is working for you. Your feedback was very helpful. The fix for Rocky is under review and should be published in the coming days.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to training-labs (stable/rocky)

Reviewed: https://review.openstack.org/615407
Committed: https://git.openstack.org/cgit/openstack/training-labs/commit/?id=63a77a85df388cc8e884c3d3b6c1b0a69d01c66a
Submitter: Zuul
Branch: stable/rocky

commit 63a77a85df388cc8e884c3d3b6c1b0a69d01c66a
Author: Roger Luethi <email address hidden>
Date: Sat Nov 3 10:30:15 2018 +0100

    Fix Ubuntu 18.04 LTS (Rocky) installation on Windows

    Ubuntu 18.04 LTS (Bionic), the distribution we use for OpenStack Rocky,
    uses systemd's rc-local service to handle /etc/rc.local. In order for
    the service to run /etc/rc.local, the file must be an executable (i.e.,
    a script with a shebang at the top and the permissions set
    appropriately). Our current rc.local lacks these properties and our
    mechanism for automatically executing scripts is never activated on
    Bionic.

    This changeset makes the necessary changes.

    Fixes Bug 1800975

    backport: rocky

    Change-Id: Ie5e73cc68b7545d126a6eca06eafc1d1601618a8

tags: added: in-stable-rocky
Changed in labs:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to training-labs (master)

Reviewed: https://review.openstack.org/615374
Committed: https://git.openstack.org/cgit/openstack/training-labs/commit/?id=573b3859145ef6fa8a5ba12f0982bd981cddf75c
Submitter: Zuul
Branch: master

commit 573b3859145ef6fa8a5ba12f0982bd981cddf75c
Author: Roger Luethi <email address hidden>
Date: Sat Nov 3 10:30:15 2018 +0100

    Fix Ubuntu 18.04 LTS (Rocky) installation on Windows

    Ubuntu 18.04 LTS (Bionic), the distribution we use for OpenStack Rocky,
    uses systemd's rc-local service to handle /etc/rc.local. In order for
    the service to run /etc/rc.local, the file must be an executable (i.e.,
    a script with a shebang at the top and the permissions set
    appropriately). Our current rc.local lacks these properties and our
    mechanism for automatically executing scripts is never activated on
    Bionic.

    This changeset makes the necessary changes.

    Fixes Bug 1800975

    backport: rocky

    Change-Id: Ie5e73cc68b7545d126a6eca06eafc1d1601618a8

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.