print a clear error when RebootNodeWithPCU returns a non-zero status.
[www-register-wizard.git] / application / views / stage8_rebootpcu.php
1 <div class="plroundedupdate">
2 <div class="plroundedwhite">
3 <h3>Confirm Reboot Node With PCU</h3>
4 <dl>
5         <?php if ( $node['boot_state'] == "disable" ): ?>
6         <dt>Step 1</dt>
7                 <dd>
8                         <span class='error'>
9                         Use the 'Test Reboot' button.  This will set the boot state to 'rins' and 
10                         attempt to reboot your machine using the registered PCU.
11                         </span>
12                 </dd>
13         <?php elseif ( $node['boot_state'] == "rins" || $node['boot_state'] == "reinstall" ): ?>
14         <dt>If Reboot succeeds,</dt><dd>
15                         your machine will reboot, install the bootstrap image, and 
16                         contacted PLC.  Finally, the boot state will be updated to 'boot'.
17                         <br>
18                         Continue using the 'Reload' button to check whether the node has
19                         completed its installation.
20         </dd>
21         <dt>If Reboot fails,</dt><dd>
22                         there will be an error displayed that will assist you in
23                         diagnosing the error.  Otherwise, please double check the
24                         registered information for the PCU, and that you can operate the
25                         PCU manually (using it's web or ssh interface).
26                         <br>
27                         To try the test again, use 'Test Reboot'.<br>
28         </dd>
29         <?php else: ?>
30         <dt><b>Success!!</b></dt><dd>
31                         The installation is complete; your machine has reached the final
32                         'boot' state.  You can continue to the final stage.</dd>
33         <?php endif; ?>
34 <?php if ( isset($error) && ! empty($error) ): ?>
35                 <dt> <span class='error'> Reboot Failure: </span> </dt>
36                 <dd> <span class='error'> <?= $error ?> </span> </dd>
37 <?php endif; ?>
38 </dl>
39
40 <table><tbody>
41         <tr><th>Site: </th><td> <a href='/db/sites/index.php?id=<?= $site_id ?>'><?= $site['name'] ?></a></td></tr>
42         <tr><th>Hostname: </th><td nowrap><?= $node['hostname'] ?></td></tr>
43         <tr><th>Boot State: </th><td><?= $node['boot_state'] ?> </td>
44                 <td>
45                 <?php if ( $node['boot_state'] == "disable" ): ?>
46                         <span class='error'> Start with the 'Test Reboot' button.</span>
47                 <?php elseif ( $node['boot_state'] == "rins" ): ?>
48                         <br>'Test Reboot' to start again.<br>
49                         'Reload' to Reload this page.
50                 <?php else: ?>
51                         <b>Success!!</b> Your machine has booted and contacted PLC.
52                         'Continue' to the final stage.
53                 <?php endif; ?>
54                 </td>
55         </tr>
56         <tr><th>Model: </th><td><?= $node['model'] ?></td></tr>
57         <tr><th>Version: </th><td nowrap='1'><?= $node['version'] ?></td></tr>
58         <tr><th>Last Contact: </th><td><?= $last_contact_str ?></td></tr>
59         <tr>
60                 <td>
61                 </td>
62                 <td colspan='2'>
63                         <?= form_open("confirm/reboot/$site_id/$pcu_id/$node_id", 
64                                                    array('style' => 'display: inline; margin: 0px')) ?>
65                                 <input type='submit' name='reboot_node' value='Test Reboot'>
66                         </form>
67                         <?= form_open("confirm/stage8_rebootpcu/$pcu_id/$site_id/$node_id", array('style' => 'display: inline; margin: 0px')) ?>
68                                 <input type='submit' name='reload_contact' value='Reload'>
69                         </form>
70                         <?= form_open("confirm/complete/$site_id/$pcu_id/$node_id", 
71                                                    array('style' => 'display: inline; margin: 0px')) ?>
72                 <?php if ( $node['boot_state'] == "boot" ): ?>
73                                 <input type='submit' value='Continue'>
74                 <?php else: ?>
75                                 <input type='submit' disabled value='Continue'>
76                 <?php endif; ?>
77                                 <input type='submit' value='Debug Continue'>
78                 </form>
79 </tbody></table><br />
80 </div>
81 </div>
82
83 <h3>Tips:</h3>
84 <ul>
85     <li>
86                         If you do not see an error, this does not mean that none have
87                         occurred.  We need your help in verifying that the PCU function is
88                         configured correctly.
89         </li>
90     <li>
91                         Please be patient.  Installations may take between 10 to 30
92                         minutes depending on the speed of your hardware and network.  Checking the
93                         console is the fastest way to verify that the installation is proceeding.
94         </li>
95 </ul>