summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fc195b3)
extend nodeips with ipv6, which is now mandatory for all domtool
controlled servers going forward.
fwtool will generate $WEBNODES using IPv6 so rules from the webservers
to the member servers actually work.
val domtool_publish = ConfigCore.installPrefix ^ "/sbin/domtool-publish"
val domtool_publish = ConfigCore.installPrefix ^ "/sbin/domtool-publish"
-val nodeIps = [("outpost", "151.236.216.192"), ("gibran", "142.93.177.82"), ("marsh", "45.55.52.66"), ("minsky", "104.248.1.95"), ("shelob", "68.183.54.165"), ("lovelace", "68.183.58.241")]
+val nodeIps = [("outpost", "151.236.216.192", "2a01:7e00::f03c:91ff:fe70:7c62"), ("gibran", "142.93.177.82", "2604:a880:800:c1::99:5001"), ("marsh", "45.55.52.66", "2604:a880:800:a1::13a3:f001"), ("minsky", "104.248.1.95", "2604:a880:800:c1::b1:5001"), ("shelob", "68.183.54.165", "2604:a880:800:c1::d:3001"), ("lovelace", "68.183.58.241", "2604:a880:800:c1::c2:7001")]
val dispatcherName = "gibran"
val dnsNodes_all = ["outpost", "gibran"]
val dispatcherName = "gibran"
val dnsNodes_all = ["outpost", "gibran"]
val domtool_publish : string
(* Names of machines who will receive configuration *)
val domtool_publish : string
(* Names of machines who will receive configuration *)
-val nodeIps : (string * string) list
+(* This should be a record type instead of a list *)
+val nodeIps : (string * string * string) list
val dispatcherName : string
val aclFile : string
val dispatcherName : string
val aclFile : string
fun get_context () = valOf (!ssl_context)
val nodes = map #1 Config.nodeIps
fun get_context () = valOf (!ssl_context)
val nodes = map #1 Config.nodeIps
-val nodeMap = foldl (fn ((node, ip), mp) => SM.insert (mp, node, ip))
+val nodeMap = foldl (fn ((node, ip, ipv6), mp) => SM.insert (mp, node, ip))
SM.empty Config.nodeIps
fun nodeIp node = valOf (SM.find (nodeMap, node))
SM.empty Config.nodeIps
fun nodeIp node = valOf (SM.find (nodeMap, node))
fun rmdom' delete resultRoot doms =
let
fun rmdom' delete resultRoot doms =
let
+ fun doNode (node, _, _) =
let
val dname = OS.Path.joinDirFile {dir = resultRoot,
file = node}
let
val dname = OS.Path.joinDirFile {dir = resultRoot,
file = node}
end
handle IO.Io _ => print ("Warning: IO error deleting domains on " ^ node ^ ".\n")
end
handle IO.Io _ => print ("Warning: IO error deleting domains on " ^ node ^ ".\n")
- fun cleanupNode (node, _) =
+ fun cleanupNode (node, _, _) =
| _ => die "Invalid cert path type")
| ["vmaildb"] => println Config.Vmail.userDatabase
| _ => die "Invalid path type")
| _ => die "Invalid cert path type")
| ["vmaildb"] => println Config.Vmail.userDatabase
| _ => die "Invalid path type")
- | ["-nodes"] => (app (fn (n, _) => (print n; print " ")) Config.nodeIps;
+ | ["-nodes"] => (app (fn (n, _, _) => (print n; print " ")) Config.nodeIps;
print "\n")
| ["-domain"] => println Config.defaultDomain
| _ => die "Invalid command-line arguments")
print "\n")
| ["-domain"] => println Config.defaultDomain
| _ => die "Invalid command-line arguments")
- fun contactNode (node, ip) =
+ fun contactNode (node, ip, ipv6) =
if node = Config.dispatcherName then
Domain.resetLocal ()
else let
if node = Config.dispatcherName then
Domain.resetLocal ()
else let
val nodeFermRules = generateNodeFermRules rules
fun write_tcp_in_conf_preamble outf =
val nodeFermRules = generateNodeFermRules rules
fun write_tcp_in_conf_preamble outf =
- (* no ipv6 support yet, but use @ipfilter() in ferm to prepare *)
TextIO.output (outf, String.concat ["@def $WEBNODES = @ipfilter((",
TextIO.output (outf, String.concat ["@def $WEBNODES = @ipfilter((",
- (String.concatWith " " (List.map (fn (_, ip) => ip)
- (List.filter (fn (node, _) => List.exists (fn (n) => n = node) (List.map (fn (node, _) => node) (Config.Apache.webNodes_all @ Config.Apache.webNodes_admin)))
+ (String.concatWith " " (List.map (fn (_, ip, ipv6) => ip ^ " " ^ "[" ^ ipv6 ^ "]")
+ (List.filter (fn (node, _, _) => List.exists (fn (n) => n = node) (List.map (fn (node, _) => node) (Config.Apache.webNodes_all @ Config.Apache.webNodes_admin)))
Config.nodeIps))),
"));\n\n"])
Config.nodeIps))),
"));\n\n"])
end)
val () = Domain.registerResetLocal (fn () =>
end)
val () = Domain.registerResetLocal (fn () =>
+ app (fn (node, _, _) =>
ignore (OS.Process.system (Config.rm ^ " -rf "
^ Config.Webalizer.configDir ^ "/"
^ node ^ "/*"))) Config.nodeIps)
ignore (OS.Process.system (Config.rm ^ " -rf "
^ Config.Webalizer.configDir ^ "/"
^ node ^ "/*"))) Config.nodeIps)