Skip to content

Commit 9d76ea2

Browse files
authored
Merge pull request #87 from rafalmiel/systemd-cp-15132
CP-15132: Systemd conversion
2 parents 6cc2616 + f3c0979 commit 9d76ea2

File tree

7 files changed

+29
-11
lines changed

7 files changed

+29
-11
lines changed

_oasis

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ Library networklibs
2626
rpclib,
2727
stdext,
2828
xcp-inventory,
29-
xcp.network
29+
xcp.network,
30+
systemd
3031
CSources: link_stubs.c, netdev.h
3132
CCOpt: -Wno-unused-function -g -ggdb
3233

@@ -48,7 +49,8 @@ Executable xcp_networkd
4849
xen-api-client,
4950
xcp,
5051
xcp.network,
51-
netlink
52+
netlink,
53+
systemd
5254

5355
Executable networkd_db
5456
CompiledObject: best

_tags

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# OASIS_START
2-
# DO NOT EDIT (digest: 6a8937157d81341f64a601d75a86be7f)
2+
# DO NOT EDIT (digest: f215aeb9d2f9547603c4304cd27da833)
33
# Ignore VCS directories, you can use the same kind of rule outside
44
# OASIS_START/STOP if you want to exclude directories that contains
55
# useless stuff for the build process
@@ -24,12 +24,14 @@ true: annot, bin_annot
2424
<lib/*.ml{,i,y}>: pkg_forkexec
2525
<lib/*.ml{,i,y}>: pkg_rpclib
2626
<lib/*.ml{,i,y}>: pkg_stdext
27+
<lib/*.ml{,i,y}>: pkg_systemd
2728
<lib/*.ml{,i,y}>: pkg_threads
2829
<lib/*.ml{,i,y}>: pkg_xcp-inventory
2930
<lib/*.ml{,i,y}>: pkg_xcp.network
3031
"lib/link_stubs.c": pkg_forkexec
3132
"lib/link_stubs.c": pkg_rpclib
3233
"lib/link_stubs.c": pkg_stdext
34+
"lib/link_stubs.c": pkg_systemd
3335
"lib/link_stubs.c": pkg_threads
3436
"lib/link_stubs.c": pkg_xcp-inventory
3537
"lib/link_stubs.c": pkg_xcp.network
@@ -39,6 +41,7 @@ true: annot, bin_annot
3941
<networkd/networkd.{native,byte}>: pkg_rpclib
4042
<networkd/networkd.{native,byte}>: pkg_rpclib.unix
4143
<networkd/networkd.{native,byte}>: pkg_stdext
44+
<networkd/networkd.{native,byte}>: pkg_systemd
4245
<networkd/networkd.{native,byte}>: pkg_threads
4346
<networkd/networkd.{native,byte}>: pkg_xcp
4447
<networkd/networkd.{native,byte}>: pkg_xcp-inventory
@@ -51,6 +54,7 @@ true: annot, bin_annot
5154
<networkd/*.ml{,i,y}>: pkg_rpclib
5255
<networkd/*.ml{,i,y}>: pkg_rpclib.unix
5356
<networkd/*.ml{,i,y}>: pkg_stdext
57+
<networkd/*.ml{,i,y}>: pkg_systemd
5458
<networkd/*.ml{,i,y}>: pkg_threads
5559
<networkd/*.ml{,i,y}>: pkg_xcp
5660
<networkd/*.ml{,i,y}>: pkg_xcp-inventory
@@ -63,6 +67,7 @@ true: annot, bin_annot
6367
<networkd_db/networkd_db.{native,byte}>: pkg_forkexec
6468
<networkd_db/networkd_db.{native,byte}>: pkg_rpclib
6569
<networkd_db/networkd_db.{native,byte}>: pkg_stdext
70+
<networkd_db/networkd_db.{native,byte}>: pkg_systemd
6671
<networkd_db/networkd_db.{native,byte}>: pkg_threads
6772
<networkd_db/networkd_db.{native,byte}>: pkg_xcp-inventory
6873
<networkd_db/networkd_db.{native,byte}>: pkg_xcp.network
@@ -71,6 +76,7 @@ true: annot, bin_annot
7176
<networkd_db/*.ml{,i,y}>: pkg_forkexec
7277
<networkd_db/*.ml{,i,y}>: pkg_rpclib
7378
<networkd_db/*.ml{,i,y}>: pkg_stdext
79+
<networkd_db/*.ml{,i,y}>: pkg_systemd
7480
<networkd_db/*.ml{,i,y}>: pkg_threads
7581
<networkd_db/*.ml{,i,y}>: pkg_xcp-inventory
7682
<networkd_db/*.ml{,i,y}>: pkg_xcp.network
@@ -82,6 +88,7 @@ true: annot, bin_annot
8288
<test/network_test.{native,byte}>: pkg_oUnit
8389
<test/network_test.{native,byte}>: pkg_rpclib
8490
<test/network_test.{native,byte}>: pkg_stdext
91+
<test/network_test.{native,byte}>: pkg_systemd
8592
<test/network_test.{native,byte}>: pkg_threads
8693
<test/network_test.{native,byte}>: pkg_xcp-inventory
8794
<test/network_test.{native,byte}>: pkg_xcp.network
@@ -91,6 +98,7 @@ true: annot, bin_annot
9198
<test/*.ml{,i,y}>: pkg_oUnit
9299
<test/*.ml{,i,y}>: pkg_rpclib
93100
<test/*.ml{,i,y}>: pkg_stdext
101+
<test/*.ml{,i,y}>: pkg_systemd
94102
<test/*.ml{,i,y}>: pkg_threads
95103
<test/*.ml{,i,y}>: pkg_xcp-inventory
96104
<test/*.ml{,i,y}>: pkg_xcp.network
@@ -101,6 +109,7 @@ true: annot, bin_annot
101109
<cli/network_cli.{native,byte}>: pkg_forkexec
102110
<cli/network_cli.{native,byte}>: pkg_rpclib
103111
<cli/network_cli.{native,byte}>: pkg_stdext
112+
<cli/network_cli.{native,byte}>: pkg_systemd
104113
<cli/network_cli.{native,byte}>: pkg_threads
105114
<cli/network_cli.{native,byte}>: pkg_xcp
106115
<cli/network_cli.{native,byte}>: pkg_xcp-inventory
@@ -111,6 +120,7 @@ true: annot, bin_annot
111120
<cli/*.ml{,i,y}>: pkg_forkexec
112121
<cli/*.ml{,i,y}>: pkg_rpclib
113122
<cli/*.ml{,i,y}>: pkg_stdext
123+
<cli/*.ml{,i,y}>: pkg_systemd
114124
<cli/*.ml{,i,y}>: pkg_threads
115125
<cli/*.ml{,i,y}>: pkg_xcp
116126
<cli/*.ml{,i,y}>: pkg_xcp-inventory

lib/META

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# OASIS_START
2-
# DO NOT EDIT (digest: de99a9d89799ce8282274091a7a1fc5b)
2+
# DO NOT EDIT (digest: 15141d14f3a161ffac233e3e5d89f7eb)
33
version = "0.10.0"
44
description = "XCP Network Daemon"
5-
requires = "forkexec stdext threads rpclib stdext xcp-inventory xcp.network"
5+
requires =
6+
"forkexec stdext threads rpclib stdext xcp-inventory xcp.network systemd"
67
archive(byte) = "networklibs.cma"
78
archive(byte, plugin) = "networklibs.cma"
89
archive(native) = "networklibs.cmxa"

networkd/network_server.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ let backend_kind = ref Openvswitch
3030

3131
let legacy_management_interface_start () =
3232
try
33-
ignore (call_script "/etc/init.d/management-interface" ["start"]);
33+
ignore (call_script "/opt/xensource/libexec/legacy-management-interface" ["start"]);
3434
debug "Upgrade: brought up interfaces using the old script. Xapi will sync up soon."
3535
with e ->
3636
debug "Error while configuring the management interface using the old script: %s\n%s"

networkd/networkd.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ let _ =
108108
Debug.with_thread_associated "main" start server
109109
) ();
110110

111+
ignore (Daemon.notify Daemon.State.Ready);
112+
111113
while true do
112114
Thread.delay 300.;
113115
Network_server.on_timer ()

opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ build: [
77
remove: [make "uninstall" "BINDIR=%{bin}%" "SBINDIR=%{bin}%" "LIBEXECDIR=%{bin}%" "SCRIPTSDIR=%{bin}%" "ETCDIR=%{prefix}%/etc"]
88
depends: [
99
"ocamlfind"
10+
"systemd"
1011
"xapi-idl"
1112
"xapi-libs-transitional"
1213
"xen-api-client"

setup.ml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(* setup.ml generated for the first time by OASIS v0.4.4 *)
22

33
(* OASIS_START *)
4-
(* DO NOT EDIT (digest: 4f31dde1aa43f140b1636f49feb27ed0) *)
4+
(* DO NOT EDIT (digest: e88d0ea8e077829e068fc22c3f10f7eb) *)
55
(*
66
Regenerated by OASIS v0.4.5
77
Visit http://oasis.forge.ocamlcore.org for more information and
@@ -6953,7 +6953,8 @@ let setup_t =
69536953
FindlibPackage ("rpclib", None);
69546954
FindlibPackage ("stdext", None);
69556955
FindlibPackage ("xcp-inventory", None);
6956-
FindlibPackage ("xcp.network", None)
6956+
FindlibPackage ("xcp.network", None);
6957+
FindlibPackage ("systemd", None)
69576958
];
69586959
bs_build_tools = [ExternalTool "ocamlbuild"];
69596960
bs_c_sources = ["link_stubs.c"; "netdev.h"];
@@ -7001,7 +7002,8 @@ let setup_t =
70017002
FindlibPackage ("xen-api-client", None);
70027003
FindlibPackage ("xcp", None);
70037004
FindlibPackage ("xcp.network", None);
7004-
FindlibPackage ("netlink", None)
7005+
FindlibPackage ("netlink", None);
7006+
FindlibPackage ("systemd", None)
70057007
];
70067008
bs_build_tools = [ExternalTool "ocamlbuild"];
70077009
bs_c_sources = [];
@@ -7139,14 +7141,14 @@ let setup_t =
71397141
};
71407142
oasis_fn = Some "_oasis";
71417143
oasis_version = "0.4.5";
7142-
oasis_digest = Some "}\206D\135\159U\248\t\220\245MT)\183S\020";
7144+
oasis_digest = Some "\n\160_\159\237\2314&\159U\152l%\br{";
71437145
oasis_exec = None;
71447146
oasis_setup_args = [];
71457147
setup_update = false
71467148
};;
71477149

71487150
let setup () = BaseSetup.setup setup_t;;
71497151

7150-
# 7151 "setup.ml"
7152+
# 7153 "setup.ml"
71517153
(* OASIS_STOP *)
71527154
let () = setup ();;

0 commit comments

Comments
 (0)