The first step is to change the mk_log_level
in the web/config/hanlon_server.conf
.
mk_log_level: Logger::DEBUG
The quickest way to restart hanlon is through pumactl
. Lets get PID
first.
# ps -ef | grep puma
root 31 1 0 Feb24 ? 00:00:56 puma 2.15.3 (tcp://0.0.0.0:8026) [web]
root 32 1 0 Feb24 ? 00:00:00 tee /tmp/puma.log
# pumactl -p 31 restart
Command restart sent success
When adding the image make sure to sepecify a password or SSH key. In this example we are using a password.
docker exec -it hanlon_server_1 ./cli/hanlon image add -t mk -p /home/hanlon/image/rancheros.iso -d /home/hanlon/image/hnl_mk.tar -m test1234
Use remote management to determine the IP address of the node. Then ssh into the machine.
ssh rancher@10.53.252.88
To enter the Hanlon "microkernel" container we need to get the CONTAINER ID
.
[rancher@rancher ~]$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
63dc0e70b2be b8668bd830dd "/bin/bash -c '/usr/l" 3 minutes ago Up 3 minutes hnl_mk
Lets enter into the running container.
[rancher@rancher ~]$ docker exec -it 63dc0e70b2be bash
bash-4.3#
Change directory to /var/log
bash-4.3# cd /var/log
We need the contents hnl_mk_controller.log
bash-4.3# cat hnl_mk_controller.log
# Logfile created on 2016-02-25 13:29:40 +0000 by logger.rb/47272
I, [2016-02-25T13:29:40.674074 #51] INFO -- Object#<top (required)>: Discovered Hanlon Server at: http://10.53.252.93:8026
D, [2016-02-25T13:29:40.674268 #51] DEBUG -- Object#<top (required)>: registration_uri = http://10.53.252.93:8026/hanlon/api/v1/node/register
D, [2016-02-25T13:29:40.674317 #51] DEBUG -- Object#<top (required)>: checkin_uri = http://10.53.252.93:8026/hanlon/api/v1/node/checkin
D, [2016-02-25T13:29:40.674518 #51] DEBUG -- Object#<top (required)>: exclude_pattern = (?-mix:(^facter.*$)|(^id$)|(^kernel.*$)|(^memoryfree$)|(^memoryfree_mb$)|(^operating.*$)|(^osfamily$)|(^path$)|(^ps$)|(^ruby.*$)|(^selinux$)|(^ssh.*$)|(^swap.*$)|(^timezone$)|(^uniqueid$)|(^.*uptime.*$)|(.*json_str$))
When logged into Rancheros, it is much easier getting into the container with
docker exec -it hnl_mk bash
than having to look up the container id all the time.