Skip to content
Browse files

Merge

  • Loading branch information...
2 parents 80ea4d9 + 64ebd3e commit cfcf7f76528c086b770003916d57c2575f91b882 @Licenser Licenser committed
View
2 Makefile
@@ -17,7 +17,7 @@ version_header: version
cp chunter.version rel/files/chunter.version
@echo "-define(VERSION, <<\"$(shell cat chunter.version)\">>)." > apps/chunter/src/chunter_version.hrl
-package: rel
+package: update rel
make -C rel/pkg package
clean:
View
2 apps/chunter/src/chunter.app.src
@@ -1,6 +1,6 @@
{application, chunter,
[{description, "SmartOS hypervisor manager."},
- {vsn, "0.7.1p2"},
+ {vsn, "0.7.2"},
{registered, []},
{applications, [
kernel,
View
12 apps/chunter/src/chunter_api.erl
@@ -4,6 +4,9 @@
-define(MAX_MDATA_SIZE, 1024*1024*32).
+call(UUID, R = [{<<"action">>, <<"zfs-", _/binary>>} | _]) ->
+ check_call(snapshot_api, UUID, R);
+
call(UUID, R = [{<<"action">>, <<"snapshot-", _/binary>>} | _]) ->
check_call(snapshot_api, UUID, R);
@@ -30,6 +33,15 @@ check_call(Type, UUID, R) ->
{error, "disabled"}
end.
+call_(UUID, [{<<"action">>, <<"zfs-list">>}])->
+ case chunter_zfs:list(<<"zones/", UUID/binary>>) of
+ {ok, Data} ->
+ {ok, [{reply, Data}]};
+ E ->
+ lager:warning("[api] zfs-list(~s) failed: ~p", [UUID, E]),
+ {error, "failed!"}
+ end;
+
call_(_UUID, [{<<"action">>, <<"remote-stop">>}])->
{error, "not implemented!"};
View
143 apps/chunter/src/chunter_ping.erl
@@ -0,0 +1,143 @@
+%%%-------------------------------------------------------------------
+%%% @author Heinz Nikolaus Gies <heinz@licenser.net>
+%%% @copyright (C) 2015, Heinz Nikolaus Gies
+%%% @doc
+%%% Service that periodically reports back to sniffle to act as a
+%%% last seen
+%%% @end
+%%% Created : 22 Dec 2015 by Heinz Nikolaus Gies <heinz@licenser.net>
+%%%-------------------------------------------------------------------
+-module(chunter_ping).
+
+-behaviour(gen_server).
+
+%% API
+-export([start_link/0]).
+-ignore_xref([start_link/0]).
+
+%% gen_server callbacks
+-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
+ terminate/2, code_change/3]).
+
+
+
+-define(SERVER, ?MODULE).
+-define(TICK, 1000*60). %% Once a minute
+
+-record(state, {host_id}).
+
+%%%===================================================================
+%%% API
+%%%===================================================================
+
+%%--------------------------------------------------------------------
+%% @doc
+%% Starts the server
+%%
+%% @spec start_link() -> {ok, Pid} | ignore | {error, Error}
+%% @end
+%%--------------------------------------------------------------------
+start_link() ->
+ gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
+
+%%%===================================================================
+%%% gen_server callbacks
+%%%===================================================================
+
+%%--------------------------------------------------------------------
+%% @private
+%% @doc
+%% Initializes the server
+%%
+%% @spec init(Args) -> {ok, State} |
+%% {ok, State, Timeout} |
+%% ignore |
+%% {stop, Reason}
+%% @end
+%%--------------------------------------------------------------------
+init([]) ->
+ timer:send_interval(?TICK, tick),
+ {ok, #state{}}.
+
+%%--------------------------------------------------------------------
+%% @private
+%% @doc
+%% Handling call messages
+%%
+%% @spec handle_call(Request, From, State) ->
+%% {reply, Reply, State} |
+%% {reply, Reply, State, Timeout} |
+%% {noreply, State} |
+%% {noreply, State, Timeout} |
+%% {stop, Reason, Reply, State} |
+%% {stop, Reason, State}
+%% @end
+%%--------------------------------------------------------------------
+handle_call(_Request, _From, State) ->
+ Reply = ok,
+ {reply, Reply, State}.
+
+%%--------------------------------------------------------------------
+%% @private
+%% @doc
+%% Handling cast messages
+%%
+%% @spec handle_cast(Msg, State) -> {noreply, State} |
+%% {noreply, State, Timeout} |
+%% {stop, Reason, State}
+%% @end
+%%--------------------------------------------------------------------
+handle_cast(_Msg, State) ->
+ {noreply, State}.
+
+%%--------------------------------------------------------------------
+%% @private
+%% @doc
+%% Handling all non call/cast messages
+%%
+%% @spec handle_info(Info, State) -> {noreply, State} |
+%% {noreply, State, Timeout} |
+%% {stop, Reason, State}
+%% @end
+%%--------------------------------------------------------------------
+handle_info(tick, State = #state{host_id = undefined}) ->
+ {ok, Host} = chunter_server:host_id(),
+ State1 = State#state{host_id = Host},
+ handle_info(tick, State1);
+
+handle_info(tick, State = #state{host_id = UUID}) ->
+ Time = erlang:system_time(seconds),
+ ls_hypervisor:last_seen(UUID, Time),
+ {noreply, State};
+
+handle_info(_Info, State) ->
+ {noreply, State}.
+
+%%--------------------------------------------------------------------
+%% @private
+%% @doc
+%% This function is called by a gen_server when it is about to
+%% terminate. It should be the opposite of Module:init/1 and do any
+%% necessary cleaning up. When it returns, the gen_server terminates
+%% with Reason. The return value is ignored.
+%%
+%% @spec terminate(Reason, State) -> void()
+%% @end
+%%--------------------------------------------------------------------
+terminate(_Reason, _State) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% @private
+%% @doc
+%% Convert process state when code is changed
+%%
+%% @spec code_change(OldVsn, State, Extra) -> {ok, NewState}
+%% @end
+%%--------------------------------------------------------------------
+code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+
+%%%===================================================================
+%%% Internal functions
+%%%===================================================================
View
12 apps/chunter/src/chunter_server.erl
@@ -24,6 +24,7 @@
reserve_mem/1,
service_action/2,
kvm_mem/0,
+ host_id/0,
disconnect/0]).
@@ -80,6 +81,9 @@ reserve_mem(N) ->
disconnect() ->
gen_server:cast(?SERVER, disconnect).
+host_id() ->
+ gen_server:call(?SERVER, host_id).
+
kvm_mem() ->
try
MemStr = os:cmd("NODE_PATH=$NODE_PATH:/usr/vm/node_modules/ "
@@ -184,8 +188,10 @@ init([]) ->
%% {stop, Reason, State}
%% @end
%%--------------------------------------------------------------------
-handle_call({call, _Auth, Call}, _From, #state{name = _Name} = State) ->
- %% statsderl:increment([Name, ".call.unknown"], 1, 1.0),
+handle_call(host_id, _From, #state{name = Name} = State) ->
+ {reply, {ok, Name}, State};
+
+handle_call({call, _Auth, Call}, _From, State) ->
lager:info([{fifo_component, chunter}],
"unsupported call - ~p", [Call]),
Reply = {error, {unsupported, Call}},
@@ -432,7 +438,7 @@ register_hypervisor() ->
{ok, H} ->
ls_hypervisor:register(Host, IPStr, Port),
case ft_hypervisor:alias(H) of
- undefined ->
+ <<>> ->
ls_hypervisor:alias(Host, Alias);
_ ->
ok
View
4 apps/chunter/src/chunter_spec.erl
@@ -9,9 +9,6 @@
-module(chunter_spec).
--ifdef(TEST).
--endif.
-
-export([to_vmadm/3,
to_zonecfg/3,
to_sniffle/1,
@@ -456,6 +453,7 @@ docker_spec(Base, Dataset, OwnerData) ->
DockerData = jsxd:get([<<"docker">>], [], OwnerData),
Base2 = jsxd:thread(
[{set, <<"docker">>, true},
+ {set, <<"autoboot">>, false},
{set, <<"internal_metadata_namespaces">>, [<<"docker">>]},
{set, <<"init_name">>, <<"/native/usr/vm/sbin/dockerinit">>},
%% What a hack :/
View
3 apps/chunter/src/chunter_sup.erl
@@ -32,5 +32,6 @@ init([]) ->
?CHILD(chunter_vm_sup, supervisor),
?CHILD(chunter_server, worker),
?CHILD(chunter_zpool_monitor, worker),
- ?CHILD(chunter_zonemon, worker)
+ ?CHILD(chunter_zonemon, worker),
+ ?CHILD(chunter_ping, worker)
]}}.
View
38 apps/chunter/src/chunter_vm_fsm.erl
@@ -186,7 +186,7 @@ door_event(Pid, Ref, down) ->
gen_fsm:send_all_state_event(Pid, {door, Ref, down});
door_event(Pid, Ref, Data) ->
- gen_fsm:sync_send_all_state_event(Pid, {door, Ref, Data}).
+ gen_fsm:sync_send_all_state_event(Pid, {door, Ref, Data}, 1000).
service_action(UUID, Action, Service)
when Action =:= enable;
@@ -342,6 +342,8 @@ initialized({create, Package, Dataset, VMSpec},
%% running already when the vmadm is doing it's work
chunter_zlogin:start(UUID, ZoneType),
do_create(UUID, VMData, VMSpec),
+ update_timeout(UUID),
+ chunter_vmadm:start(UUID),
{next_state, creating,
State#state{type = Type,
zone_type = ZoneType,
@@ -436,9 +438,7 @@ stopped({transition, NextState = <<"booting">>}, State) ->
State#state{public_state = change_state(State#state.uuid, NextState)}};
stopped(start, State = #state{uuid = UUID, zone_type = docker}) ->
- T = erlang:system_time(milli_seconds) + 60000,
- chunter_vmadm:update(UUID, [{<<"set_internal_metadata">>,
- [{<<"docker:wait_for_attach">>, T}]}]),
+ update_timeout(UUID),
chunter_vmadm:start(UUID),
{next_state, stopped, State};
@@ -1073,9 +1073,7 @@ do_snapshot(<<_:1/binary, P/binary>>, _VM, SnapID, _) ->
finish_snapshot(_VM, _SnapID, [backup], ok) ->
ok;
finish_snapshot(VM, SnapID, _, ok) ->
- ls_vm:set_snapshot(
- VM, [{[SnapID, <<"state">>],
- <<"completed">>}]),
+ snap_state(VM, SnapID, <<"completed">>),
libhowl:send(VM,
[{<<"event">>, <<"snapshot">>},
{<<"data">>,
@@ -1086,6 +1084,10 @@ finish_snapshot(VM, SnapID, _, ok) ->
finish_snapshot(_VM, _SnapID, _, error) ->
error.
+snap_state(VM, SnapID, State) ->
+ ls_vm:set_snapshot(VM, [{[SnapID, <<"state">>], State}]).
+
+
do_delete_snapshot(<<_:1/binary, P/binary>>, _VM, SnapID, _) ->
chunter_zfs:destroy_snapshot(P, SnapID, [f, r]).
@@ -1294,18 +1296,19 @@ snapshot_sizes(VM) ->
%% _:43 is '/zones/' + uuid
do_restore(Path, VM, {local, SnapId}, Opts) ->
do_rollback_snapshot(Path, VM, SnapId, Opts);
-do_restore(Path = <<_:43/binary, Dx/binary>>, VM, {full, SnapId, SHAs}, Opts) ->
- File = <<VM/binary, "/", SnapId/binary, Dx/binary>>,
- SHA1 = jsxd:get([File], <<>>, SHAs),
- do_destroy(Path, VM, SnapId, Opts),
- chunter_snap:download(Path, VM, SnapId, SHA1, Opts),
- wait_import(Path),
- do_rollback_snapshot(Path, VM, SnapId, Opts);
-do_restore(Path = <<_:43/binary, Dx/binary>>, VM, {incr, SnapId, SHAs}, Opts) ->
+do_restore(Path = <<_:43/binary, Dx/binary>>, VM, {Type, SnapId, SHAs}, Opts)
+when Type =:= full;
+ Type =:= incr ->
File = <<VM/binary, "/", SnapId/binary, Dx/binary>>,
SHA1 = jsxd:get([File], <<>>, SHAs),
+ case Type of
+ full -> do_destroy(Path, VM, SnapId, Opts);
+ _ -> ok
+ end,
+ snap_state(VM, SnapId, <<"restoring">>),
chunter_snap:download(Path, VM, SnapId, SHA1, Opts),
wait_import(Path),
+ snap_state(VM, SnapId, <<"completed">>),
do_rollback_snapshot(Path, VM, SnapId, Opts).
do_destroy(<<_:1/binary, P/binary>>, _VM, _SnapID, _) ->
@@ -1598,3 +1601,8 @@ confirm_create(_UUID, <<>>) ->
confirm_create(UUID, Org) ->
ls_acc:update(Org, UUID, timestamp(),
[{<<"event">>, <<"confirm_create">>}]).
+
+update_timeout(UUID) ->
+ T = erlang:system_time(milli_seconds) + 60000,
+ chunter_vmadm:update(UUID, [{<<"set_internal_metadata">>,
+ [{<<"docker:wait_for_attach">>, T}]}]).
View
66 apps/chunter/src/chunter_zfs.erl
@@ -8,7 +8,8 @@
destroy/1,
destroy/2,
rollback/2,
- rollback/3
+ rollback/3,
+ list/1
]).
-ignore_xref([
@@ -19,7 +20,8 @@
destroy/1,
destroy/2,
rollback/2,
- rollback/3
+ rollback/3,
+ list/1
]).
-define(ZFS, "/usr/sbin/zfs").
@@ -34,7 +36,8 @@ destroy_snapshot(Path, SnapID, Args) ->
P = <<Path/binary, "@", SnapID/binary>>,
destroy(P, Args).
-
+list(Path) ->
+ zfs("list", [r, {t, "all"}], Path).
snapshot(Path, SnapID) ->
snapshot(Path, SnapID, []).
@@ -50,28 +53,26 @@ rollback(Path, SnapID, Args) ->
P = <<Path/binary, "@", SnapID/binary>>,
zfs("rollback", build_opts(Args, fun rollback_opt_to_char/1), P).
-
-
-rollback_opt_to_char(force) -> $f;
-rollback_opt_to_char(f) -> $f;
-rollback_opt_to_char(recurseive) -> $r;
-rollback_opt_to_char(r) -> $r;
-rollback_opt_to_char(recurseive_clones) -> $R;
-rollback_opt_to_char('R') -> $R.
-
-snapshot_opt_to_char(recurseive) -> $r;
-snapshot_opt_to_char(r) -> $r.
-
-destroy_opt_to_char(defer) -> $d;
-destroy_opt_to_char(d) -> $d;
-destroy_opt_to_char(force) -> $f;
-destroy_opt_to_char(f) -> $f;
-destroy_opt_to_char(recurseive) -> $r;
-destroy_opt_to_char(r) -> $r;
-destroy_opt_to_char(recurseive_dependants) -> $R;
-destroy_opt_to_char('R') -> $R;
-destroy_opt_to_char(dry_run) -> $n;
-destroy_opt_to_char(n) -> $n;
+rollback_opt_to_char(force) -> f;
+rollback_opt_to_char(f) -> f;
+rollback_opt_to_char(recurseive) -> r;
+rollback_opt_to_char(r) -> r;
+rollback_opt_to_char(recurseive_clones) -> 'R';
+rollback_opt_to_char('R') -> 'R'.
+
+snapshot_opt_to_char(recurseive) -> r;
+snapshot_opt_to_char(r) -> r.
+
+destroy_opt_to_char(defer) -> d;
+destroy_opt_to_char(d) -> d;
+destroy_opt_to_char(force) -> f;
+destroy_opt_to_char(f) -> f;
+destroy_opt_to_char(recurseive) -> r;
+destroy_opt_to_char(r) -> r;
+destroy_opt_to_char(recurseive_dependants) -> 'R';
+destroy_opt_to_char('R') -> 'R';
+destroy_opt_to_char(dry_run) -> n;
+destroy_opt_to_char(n) -> n;
destroy_opt_to_char(C) -> opt_to_char(C).
@@ -80,21 +81,20 @@ destroy_opt_to_char(C) -> opt_to_char(C).
zfs(Cmd, [], Target) ->
zfs([Cmd, Target]);
zfs(Cmd, Args, Target) ->
- zfs([Cmd, Args, Target]).
+ zfs([Cmd | Args] ++ [Target]).
zfs(Args) ->
lager:debug("ZFS: ~s ~p", [?ZFS, Args]),
fifo_cmd:run(?ZFS, Args).
build_opts([], _) ->
- "";
+ [];
build_opts(Opts, F) ->
- [$- |
- [F(O) || O <- Opts]].
+ [F(O) || O <- Opts].
-opt_to_char(p) -> $p;
-opt_to_char(parsable) -> $p;
-opt_to_char(v) -> $p;
-opt_to_char(verbose) -> $v.
+opt_to_char(p) -> p;
+opt_to_char(parsable) -> p;
+opt_to_char(v) -> v;
+opt_to_char(verbose) -> v.
View
12 rebar.config
@@ -8,7 +8,7 @@
[
{lager, "2.1.1"},
{fifo_lager, ".*", {git, "https://github.com/project-fifo/fifo_lager.git", {tag, "0.1.1"}}},
- {bugsnag, ".*", {git, "https://github.com/project-fifo/bugsnag-erlang.git", {tag, "0.1.0"}}},
+ {bugsnag, ".*", {git, "https://github.com/project-fifo/bugsnag-erlang.git", {tag, "0.1.1"}}},
{cuttlefish, ".*", {git, "https://github.com/tsloughter/cuttlefish.git", {branch, "develop"}}},
{jsx, "1.4.5"},
@@ -19,11 +19,11 @@
jsxd,
fifo_utils,
{fifo_s3, "0.1.*", {git, "https://github.com/project-fifo/fifo_s3.git", {tag, "0.1.14"}}},
- {libsniffle, "0.3.*", {git, "https://github.com/project-fifo/libsniffle.git", {tag, "0.3.32"}}},
- {libsnarl, "0.3.*", {git, "https://github.com/project-fifo/libsnarl.git", {tag, "0.3.36"}}},
+ {libsniffle, "0.3.*", {git, "https://github.com/project-fifo/libsniffle.git", {tag, "0.3.34"}}},
+ {libsnarl, "0.3.*", {git, "https://github.com/project-fifo/libsnarl.git", {tag, "0.3.38"}}},
{libhowl, "0.3.*", {git, "https://github.com/project-fifo/libhowl.git", {tag, "0.1.30"}}},
- {fifo_dt, "0.1.*", {git, "https://github.com/project-fifo/fifo_dt.git", {tag, "0.1.58"}}},
- {fifo_spec, "0.1.*", {git, "https://github.com/project-fifo/fifo_spec.git", {tag, "0.1.24"}}},
+ {fifo_dt, "0.1.*", {git, "https://github.com/project-fifo/fifo_dt.git", {tag, "0.1.60"}}},
+ {fifo_spec, "0.1.*", {git, "https://github.com/project-fifo/fifo_spec.git", {tag, "0.1.26"}}},
smurf,
eper,
recon
@@ -57,7 +57,7 @@
[{post, [{release, cuttlefish}]}]}.
{relx,
- [{release, {"chunter", "0.7.1p2"},
+ [{release, {"chunter", "0.7.2"},
[
sasl,
chunter,
View
12 rebar.lock
@@ -1,7 +1,7 @@
[{<<"base16">>,{pkg,<<"base16">>,<<"1.0.0">>},1},
{<<"bugsnag">>,
{git,"https://github.com/project-fifo/bugsnag-erlang.git",
- {ref,"6bd45c3937627fc209ef75c8b20219876dd46159"}},
+ {ref,"2a1966b9682d2a325f70d4447b9a395342cde62b"}},
0},
{<<"cuttlefish">>,
{git,"https://github.com/tsloughter/cuttlefish.git",
@@ -19,7 +19,7 @@
{<<"erltrace">>,{pkg,<<"erltrace">>,<<"0.1.4">>},0},
{<<"fifo_dt">>,
{git,"https://github.com/project-fifo/fifo_dt.git",
- {ref,"c5eaab3ff640d6e0ed7ce8e139c84903f76113bd"}},
+ {ref,"5c0b3630b42e89b7ad8293f35b16a129cc1cbb36"}},
0},
{<<"fifo_lager">>,
{git,"https://github.com/project-fifo/fifo_lager.git",
@@ -31,9 +31,9 @@
0},
{<<"fifo_spec">>,
{git,"https://github.com/project-fifo/fifo_spec.git",
- {ref,"8e7c108516fccdf4a5af408f92eb6df9ee4c3b87"}},
+ {ref,"ea60659ff646f31629e66ae4a54de92b5015cfb0"}},
0},
- {<<"fifo_utils">>,{pkg,<<"fifo_utils">>,<<"0.1.18">>},0},
+ {<<"fifo_utils">>,{pkg,<<"fifo_utils">>,<<"0.1.19">>},0},
{<<"getopt">>,
{git,"git://github.com/jcomellas/getopt.git",
{ref,"659a28f4145bc9843598972854299dc4ea77e4cb"}},
@@ -56,12 +56,12 @@
0},
{<<"libsnarl">>,
{git,"https://github.com/project-fifo/libsnarl.git",
- {ref,"c8f73510456e667a8b30046a1ac303e25c64972e"}},
+ {ref,"8d8ce0bc128c98cb36d98d5904e2eb99b1068791"}},
0},
{<<"libsnarlmatch">>,{pkg,<<"libsnarlmatch">>,<<"0.1.7">>},1},
{<<"libsniffle">>,
{git,"https://github.com/project-fifo/libsniffle.git",
- {ref,"d2182a460fed55ecefa86adaef99f90e14293857"}},
+ {ref,"0e943c1e99afaba55ea9631af0be728c27031936"}},
0},
{<<"mdns_client">>,{pkg,<<"mdns_client">>,<<"0.1.7">>},2},
{<<"mdns_client_lib">>,{pkg,<<"mdns_client_lib">>,<<"0.1.30">>},1},
View
2 rel/pkg/Makefile
@@ -1,4 +1,4 @@
-VERSION=0.7.1p2
+VERSION=0.7.2
COMPONENT=chunter
SUFFIX:=$(shell echo $(SUFFIX))
BASENAME:=$(COMPONENT)-$(VERSION)$(SUFFIX)
View
2 rel/vars.config
@@ -10,4 +10,4 @@
{bugsnag_app, "chunter"}.
{bugsnag_release_state, "release"}.
-{bugsnag_app_version, "0.7.1p2"}.
+{bugsnag_app_version, "0.7.2"}.
View
77 share/chunter-diag
@@ -0,0 +1,77 @@
+#!/usr/bin/bash
+
+date=$(date +%F-%H-%M-%S)
+base=/var/tmp/chunter-diag
+dir=$base/$date
+mkdir -p $dir
+log_file=$dir/chunter-diag.log
+echo '========================================' > $log_file
+echo "Chunter Diagnostics ${date}" >> $log_file
+echo '========================================' >> $log_file
+function le() {
+ echo "$1"
+ echo "$1" >> $log_file
+}
+function log_run(){
+ echo >> $log_file
+ echo >> $log_file
+ echo '----------------------------------------' >> $log_file
+ echo "$*" >> $log_file
+ echo '----------------------------------------' >> $log_file
+ $* >> $log_file
+}
+echo "Gathering System information."
+log_run ifconfig
+echo >> $log_file >> $log_file
+echo >> $log_file
+log_run svcs svc:/network/epmd:default
+log_run svcs svc:/network/chunter:default
+log_run svcs svc:/fifo/zlogin:default
+log_run df -h
+log_run zonememstat
+log_run prstat 1 1
+log_run sysinfo
+
+
+pid=$(pgrep -f /opt/chunter/*/bin/beam.smp)
+log_run lsof -P $pid
+log_run lsof -F $pid
+
+echo "Copying Logfiles"
+cp -r /var/log/chunter $dir/logs
+cp /var/svc/log/network-chunter:default.log $dir/logs
+
+echo "Copying config files"
+mkdir $dir/config
+cp /opt/chunter/etc/chunter.conf* $dir/config
+cp -r /var/tmp/generated.configs/ $dir/config
+cp -r /opt/fifo_zlogin/releases/ $dir/config
+
+le
+le
+le '========================================'
+le "Common errors"
+le '========================================'
+
+if grep nxdomain /var/log/chunter/error.log* > /dev/null
+then
+ le "[error] DNS is not propperly set up, the leoFS domain can not be resolved"
+fi
+
+chunter_cookie=`egrep '^[ \t]*distributed_cookie[ \t]*=[ \t]*' /opt/chunter/etc/chunter.conf 2> /dev/null | cut -d = -f 2 | sed -e 's/^[ ]*//'`
+
+zlogin_cookie=`egrep '^\-setcookie' /opt/fifo_zlogin/releases/0.1.1/vm.args | awk '{ print $2 }' 2> /dev/null`
+
+if [ "${chunter_cookie}" != "${zlogin_cookie}" ]
+then
+ le "[error] zlogin and Chunter cookies do not match!"
+fi
+
+echo "Compressing data"
+(cd $base; tar cfz chunter-diag-$date.tgz $date)
+
+
+echo
+echo
+echo "Diagnostics run complete the the file can be found in $base/chunter-diag-$date.tgz the data provided can be inspected in $base/$date."
+
View
14 tree
@@ -1,12 +1,12 @@
-├─ bugsnag─0.1.0
-├─ chunter─0.7.1
+├─ bugsnag─0.1.1
+├─ chunter─0.7.2
├─ cuttlefish─2.0.0+build.479.reff5f6fdc
│ ├─ getopt─0.4.3
│ └─ neotoma─1.7.2
├─ eper─0.94.0
├─ erlsom─1.2.1
├─ erltrace─0.1.4
-├─ fifo_dt─0.1.58
+├─ fifo_dt─0.1.60
│ ├─ libsnarlmatch─0.1.7
│ └─ riak_dt─2.1.1
├─ fifo_lager─0.1.1
@@ -16,8 +16,8 @@
│ ├─ base16─1.0.0
│ ├─ erlcloud─0.8.6
│ └─ poolboy─1.5.1
-├─ fifo_spec─0.1.24
-├─ fifo_utils─0.1.18
+├─ fifo_spec─0.1.26
+├─ fifo_utils─0.1.19
├─ jsx─1.4.5
├─ jsxd─0.1.10
├─ lager─2.1.1
@@ -26,9 +26,9 @@
│ └─ mdns_client_lib─0.1.30
│ ├─ mdns_client─0.1.7
│ └─ pooler─1.4.0
-├─ libsnarl─0.3.36
+├─ libsnarl─0.3.38
│ └─ oauth2─0.6.0
-├─ libsniffle─0.3.32
+├─ libsniffle─0.3.34
├─ ranch─1.1.0
├─ recon─2.2.1
├─ smurf─0.1.3

0 comments on commit cfcf7f7

Please sign in to comment.
Something went wrong with that request. Please try again.