File tree Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,8 @@ let sort_and_update () =
97
97
; interface_order= Some new_order
98
98
}
99
99
| Error err ->
100
- error " Failed to sort interface order"
100
+ error " Failed to sort interface order [%s]"
101
+ (Network_device_order. string_of_error err)
101
102
102
103
let sort_on_first_boot () =
103
104
if Network_utils. is_sorted_by_script () then
@@ -107,7 +108,8 @@ let sort_on_first_boot () =
107
108
| Ok (sorted , _ ) ->
108
109
Some sorted
109
110
| Error err ->
110
- error " Failed to sort interface order" ;
111
+ error " Failed to sort interface order [%s]"
112
+ (Network_device_order. string_of_error err) ;
111
113
Some []
112
114
113
115
let build_config () =
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ let parse_dns_config args =
87
87
(nameservers, domains)
88
88
89
89
let write_manage_iface_to_inventory bridge_name =
90
+ info " Writing management interface to inventory: %s" bridge_name ;
90
91
Inventory. update Inventory. _management_interface bridge_name
91
92
92
93
let read_management_conf interface_order =
Original file line number Diff line number Diff line change @@ -36,6 +36,22 @@ type error =
36
36
| Duplicate_position
37
37
| Invalid_biosdevname_key_value of (string * string )
38
38
39
+ let string_of_error = function
40
+ | Pci_addr_parse_error s ->
41
+ Printf. sprintf " Invalid PCI address: %s" s
42
+ | Mac_addr_parse_error s ->
43
+ Printf. sprintf " Invalid MAC address: %s" s
44
+ | Rule_parse_error s ->
45
+ Printf. sprintf " Invalid rule: %s" s
46
+ | Missing_biosdevname_key k ->
47
+ Printf. sprintf " Missing key in biosdevname output: %s" k
48
+ | Duplicate_mac_address ->
49
+ " Duplicate MAC address"
50
+ | Duplicate_position ->
51
+ " Duplicate position"
52
+ | Invalid_biosdevname_key_value (k , v ) ->
53
+ Printf. sprintf " Invalid key-value pair in biosdevname output: %s=%s" k v
54
+
39
55
module Pciaddr = struct
40
56
type t = Xcp_pci .address
41
57
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ type error =
24
24
| Duplicate_position
25
25
| Invalid_biosdevname_key_value of (string * string )
26
26
27
+ val string_of_error : error -> string
28
+ (* * [string_of_error e] returns a string representation of the error [e]. *)
29
+
27
30
(* * PCI address in format SBDF: domain:bus:device:function *)
28
31
module Pciaddr : sig
29
32
(* * Type of the PCI address *)
You can’t perform that action at this time.
0 commit comments