After marking a machine as broken this was what I had to do in order to restore it to it's previous state:
update maasserver_node set owner_id=5, osystem='ubuntu', distro_series='jammy', hwe_kernel='hwe-22.04', agent_name='37e6a200-908d-464d-85bb-fcc7cf12d6e8', netboot='f', current_installation_script_set_id=1538, enable_hw_sync='t' where system_id='ru3chp'; insert into maasserver_filesystem ("created", "updated", "uuid", "fstype", "label", "mount_point", "acquired", "partition_id", "block_device_id", "filesystem_group_id", "create_params", "cache_set_id", "mount_options", "node_config_id") values ('2024-02-21 19:02:52.970848+00', '2024-02-21 19:02:52.970848+00', 'e01f283f-0c3e-4724-98d6-233470798bcc', 'fat32', 'efi', '/boot/efi', 't', 737, NULL, NULL, NULL, NULL, NULL, 218); insert into maasserver_filesystem ("created", "updated", "uuid", "fstype", "label", "mount_point", "acquired", "partition_id", "block_device_id", "filesystem_group_id", "create_params", "cache_set_id", "mount_options", "node_config_id") values ('2024-02-21 19:02:53.024758+00', '2024-02-21 19:02:53.024758+00', '99f89676-a456-48c6-a4c0-d4a4df7745b2', 'ext4', 'root', '/', 't', NULL, 578, NULL, NULL, NULL, NULL, 218); update maasserver_staticipaddress set ip='192.168.0.120' where id=13179; insert into maasserver_interface_ip_addresses ("interface_id", "staticipaddress_id") values (5982, 13179);
The last two have to be done for each ip address the machine has.
After marking a machine as broken this was what I had to do in order to restore it to it's previous state:
update maasserver_node set owner_id=5, osystem='ubuntu', distro_ series= 'jammy' , hwe_kernel= 'hwe-22. 04', agent_name= '37e6a200- 908d-464d- 85bb-fcc7cf12d6 e8', netboot='f', current_ installation_ script_ set_id= 1538, enable_hw_sync='t' where system_id='ru3chp'; filesystem ("created", "updated", "uuid", "fstype", "label", "mount_point", "acquired", "partition_id", "block_device_id", "filesystem_ group_id" , "create_params", "cache_set_id", "mount_options", "node_config_id") values ('2024-02-21 19:02:52. 970848+ 00', '2024-02-21 19:02:52. 970848+ 00', 'e01f283f- 0c3e-4724- 98d6-233470798b cc', 'fat32', 'efi', '/boot/efi', 't', 737, NULL, NULL, NULL, NULL, NULL, 218); filesystem ("created", "updated", "uuid", "fstype", "label", "mount_point", "acquired", "partition_id", "block_device_id", "filesystem_ group_id" , "create_params", "cache_set_id", "mount_options", "node_config_id") values ('2024-02-21 19:02:53. 024758+ 00', '2024-02-21 19:02:53. 024758+ 00', '99f89676- a456-48c6- a4c0-d4a4df7745 b2', 'ext4', 'root', '/', 't', NULL, 578, NULL, NULL, NULL, NULL, 218); staticipaddress set ip='192.168.0.120' where id=13179; interface_ ip_addresses ("interface_id", "staticipaddres s_id") values (5982, 13179);
insert into maasserver_
insert into maasserver_
update maasserver_
insert into maasserver_
The last two have to be done for each ip address the machine has.