ClusterLabs / anvil

The Anvil! Intelligent Availability™ Platform, mark 3
5 stars 6 forks source link

Editing install manifests doesn't load data #514

Closed digimer closed 9 months ago

digimer commented 10 months ago

I tried to edit an install manifest, and all the form fields were blank, like it was a new manifest.

image

digimer commented 10 months ago

In addition; I made a mistake when creating the manifest where I assigned both the ip '10.201.16.2' to a subnode for it's BCN and SN IPs. The SN was defined as 10.101/16, so this error should have been checked/caught in the sanity check before the manifest was saved.

 <?xml version="1.0" encoding="UTF-8"?>
 <install_manifest name="an-anvil-04" domain="alteeve.com">
         <networks mtu="0" dns="8.8.8.8,8.8.4.4" ntp="">
                 <network name="bcn1" network="10.201.0.0" subnet="255.255.0.0" gateway="" />
                 <network name="ifn1" network="10.255.0.0" subnet="255.255.0.0" gateway="10.255.255.254" />
                 <network name="sn1" network="10.101.0.0" subnet="255.255.0.0" gateway="" />       <!-- Here the SN is defined -->
         </networks>
         <upses>
                 <ups name="an-ups01" uuid="99d5a615-2d8a-4f93-acdc-a3d8b939c665" />
                 <ups name="an-ups02" uuid="77bc0864-706c-4c10-af8a-00992201ec62" />
         </upses>
         <fences>
                 <fence name="an-pdu01" uuid="626b0999-c0bd-4153-84a4-680a87791f26" />
                 <fence name="an-pdu02" uuid="662052d4-ec52-4821-9c4b-e7d1005e0ae6" />
         </fences>
         <machines>
                 <node1 name="an-a04n01" ipmi_ip="10.201.17.1">
                         <networks>
                                 <network name="bcn1" ip="10.201.16.1" />
                                 <network name="ifn1" ip="10.255.16.1" />
                                 <network name="sn1" ip="10.101.16.1" />
                         </networks>
                         <upses>
                                 <ups name="an-ups01" used="1" />
                                 <ups name="an-ups02" used="1" />
                         </upses>
                         <fences>
                                 <fence name="an-pdu01" port="5" />
                                 <fence name="an-pdu02" port="5" />
                         </fences>
                 </node1>
                 <node2 name="an-a04n02" ipmi_ip="10.255.17.2">
                         <networks>
                                 <network name="bcn1" ip="10.201.16.2" />
                                 <network name="ifn1" ip="10.255.16.2" />
                                 <network name="sn1" ip="10.201.16.2" />           <!-- This SN is wrong -->
                         </networks>
                         <upses>
                                 <ups name="an-ups01" used="1" />
                                 <ups name="an-ups02" used="1" />
                         </upses>
                         <fences>
                                 <fence name="an-pdu01" port="6" />
                                 <fence name="an-pdu02" port="6" />
                         </fences>
                 </node2>
         </machines>
 </install_manifest>
digimer commented 10 months ago

OK, the problem with the editing was that the session had timed out. I could navigate to the edit section, but it wouldn't load because, I assume, the session was invalid. When I tried to go back to the dashboard, it then kicked me to the login screen. After logging back in, I could edit the manifest properly. So this issues is 2-parts;

  1. When the user's session times out, it should immediately kick them back to the login screen, not waiting for interaction. (There might be an open issue for this already)
  2. The manifest should not have been able to be saved when an IP assigned to network X does fall within the defined network.