These are chat archives for allegro/ralph

28th
Mar 2015
whoisearth
@whoisearth
Mar 28 2015 17:47
Still trying to figure out why my ssh_linux is not scanning and I'm wondering if it's because I hadn't done this step -
http://ralph.readthedocs.org/en/latest/scan.html#scanning-new-devices
however documentation isn't 100% clear as to how to setup the network and it would seem the latest docker version is different than the documentation. There is no autoscan option in the GUI, let alone at network area and screenshots are definitely different.
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 17:48
@whoisearth if 127.0.0.1 doesn't work for you, maybe scan some another host
whoisearth
@whoisearth
Mar 28 2015 17:53
doesn't matter the IP I scan anything on my internet network and ssh_linux fails. from inside docker container I can ping another IP and connect to it through ssh like ssh root@10.77.1.50 fine but the scan doesn't
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 17:54
Connection refused?
you can put some debugging info into the plugin file
whoisearth
@whoisearth
Mar 28 2015 17:55
no idea how do I enable logging or get the ssh_linux in high debug or run it manually to see? I've done /home/ralph/bin/ralph scan 10.77.1.50 -V VERBOSE but provides same info as the gui
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 17:55
find file /home/ralph/sources/ralph/src/ralph/scan/plugins/ssh_linux
(from memory - may be different)
whoisearth
@whoisearth
Mar 28 2015 17:56
yup that's the file /home/ralph/sources/ralph/src/ralph/scan/plugins/ssh_linux.py
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 17:57
you can put some logger.error("something") there as a checkpoints...
and it will be put into the runtime.log file in ~/.ralph/runtime.log
whoisearth
@whoisearth
Mar 28 2015 18:00
should /home/ralph/.ralph/runtime.log already exist as it's not there in my docker container
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 18:02
        ssh = network.connect_ssh(ip_address, user, password)
this line is probably critical
whoisearth
@whoisearth
Mar 28 2015 18:03
yup so you want me to put a logger.error(e) in the except network.AuthError:?
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 18:03
yes
and restart ralph, and check runtime.log
whoisearth
@whoisearth
Mar 28 2015 18:06
k just ran service supervisor restart
that ok or restart docker container?
that runtime.log isn't being created...
whoisearth
@whoisearth
Mar 28 2015 18:15
global name logger is not defined. I'm guessing the logger module isn't included within the application and that I need to add it into the file at the beginning
ah module is logging not logger anyways, will import directly into ssh_linux.py and see if I can get something
ok so I'm putting in a few flags in the file containing logging.warning('random text') as logging.warning will print to console (running scan from command line) and nothing is coming up
so I'm going to put some more logging flags in and see if I can get anything to come up
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 18:22
well, if you are running from console you can use messages.append('something.')
which is handled nicely with the console output, not runtime.log
whoisearth
@whoisearth
Mar 28 2015 18:29
hmmm... seems like only NoMatchError is printing to console. I modified this NoMatchError("No snmp found") and it printed the new info to the console. but if I put 2 different lines in there messages.append('No snmp found to console') or logging.warning('No snmp found from logging') they're not printing to console at all.
This in particular is what I have in the code at line 255 - if not snmp_name: messages.append('No snmp found to console') logging.warning('No snmp found from logging') raise NoMatchError("No snmp found")
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 18:31
so the problem is with snmp lacking?
explanation is here allegro/ralph#496
whoisearth
@whoisearth
Mar 28 2015 18:34
no just using as an example
because I know that message is coming up in the console
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 18:35
in order to run ssh linux you have to have snmp previosly discovered
whoisearth
@whoisearth
Mar 28 2015 18:37
aaaaah ok finally something is making sense!
fyi though I run ralph chains and it doesn't give me any of the info in that explaination this is what it gives me -
root@671ddbdbf868:/# /home/ralph/bin/ralph chains
deployment chain:
  • START -> clean
  • clean -> role
  • clean, dhcp, dns, role -> change_status
  • clean, dns -> dhcp
  • clean, role -> dns
    openstack chain:
  • START -> openstack
    splunk chain:
  • START -> splunk
    zabbix chain:
  • START -> update_role_zabbix_templates
so long story short my servers needs to have snmp setup on them?
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 18:39
yes
or you can send some patch to modify this assumption
you can try to comment out this check just to try out
whoisearth
@whoisearth
Mar 28 2015 18:47
woohoo! commented out all the snmp and now seeing Authorization Failed! I'm goign to troubleshoot more on my end now and figure out how to handle this on my end. Have 2 separate systems to test this against (home and work) but the future is looking brighter now :)
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 18:47
:)
thumbs up
whoisearth
@whoisearth
Mar 28 2015 18:48
I'm going to be pushing hard to get my work do you take pull requests if I make changes on my end?
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 18:49
of course
whoisearth
@whoisearth
Mar 28 2015 18:49
great stuff! I'll let you know when I figure out the underlying authorization issue on my end. curious to see if it's the same thing on my work network. On call this week so might as well dig into it.
✪ vi4m Marcin Kliks
@vi4m
Mar 28 2015 18:49
ok.
see you later then :) BBL