Enable advanced debugging

Enable advanced debuggingΒΆ

If creating a new bootstrap image results in errors, you can analyze your system by enabling the chroot bootstrap development environment.

This section provides an example of running bootstrap building in the chroot environment.

To enable advanced debugging:

Warning

Use for debug purpose only.

  1. Prepare the sleep script:

    $ cat /root/sleep.sh
    #!/bin/bash
    sleep 99h || true
    
  2. Start the build process with the sleep.sh script:

    $ fuel-bootstrap --verbose --debug build --extra-dir /root/mlnx/mlnx_bootstrap_root/ \
                     --label debug --activate  --script /root/sleep.sh
    

    System response:

    ...
    Copy user-script /root/sleep.sh into chroot:/tmp/tmpdOS3ya.fuel-agent-image
    Trying to execute command: chroot /tmp/tmpdOS3ya.fuel-agent-image /bin/bash -c /sleep.sh
    
    The process is sleeping and you can jump into chroot
    

    The sleep.sh script delays the start of the building process. Therefore, you can enable the chroot environment.

  3. Enable the chroot environment:

    $ chroot /tmp/tmpdOS3ya.fuel-agent-image /bin/bash
    
  4. Fix PATH difference between CentOS and Ubuntu environmnets:

    $ export PATH=$PATH:/sbin:/bin
    
  5. You can now make any changes to the bootstrap-dev system.

  6. After you apply the required changes, exit the chroot environment.

  7. Terminate the sleep process:

    $ [root@nailgun ~]# ps xauf |grep sleep
    

    System response:

    root     23642  0.0  0.0   9524  1128 pts/14   S+   17:54   0:00  |           \_ /bin/bash /sleep.sh
    root     23643  0.0  0.0   4340   360 pts/14   S+   17:54   0:00  |               \_ sleep 99h
    
    $ kill -s INT 23643
    

After that, the building process will continue as usual.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

Contents