[racktables-users] Re: Cannot import vlan or cdp from a switch

  • From: Denis Ovsienko <infrastation@xxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Sun, 08 May 2011 21:00:04 +0400

26.04.2011, 02:27, Paul_Guest@xxxxxxxxxxxxxxxx:
> I too am seeing these issues (v0.19.4).  The below is from the "Live VLANs"
> tab.  Hopefully this will narrow down the cause for those who understand
> PHP better than I (not much of a stretch, that...):
>
> gateway failed with code 127:
>      Echoing $racktables_gwdir in gateways.php @ line 84 returns an empty
> string.  $racktables_gwdir is returning true to the isset in pre-init, so
> there must be a lingering value or declaration elsewhere that I'm missing.
> Manually setting the variable to the right path successfully works around:
>     ----
>     $execpath = "/var/www/racktables/gateways/{$gwname}/main";
>     ----

Let me comment on this. It is supposed, that an unpacked tar.gz should not 
require changing of $racktables_gwdir to work. But in case of a custom 
directory layout the only file, that needs to be changed is user's secret.php. 
What is the directory with index.php on the server? This season's best practice 
is to move RackTables out of the wwwroot like described in my previous reply.

> gateway failed with code 126:
>     Permission issues.  Changed gateways/switchvlans/main & cisco.connector
> to 777 resolved this.

This looks like the archive contents was first unpacked and then uploaded to 
the server with some default attributes set for every file. That would also 
explain failing LLDP (every file in deviceconfig besides the switch.secrets.php 
must be executable).

> Then I was getting a password not found error.  Had to set
> gateways/switchvlans/cisco.secrets.php to work past that (deviceconfig is
> ignored?).

Yes. This old LiveVLANs code takes some efforts to get dismissed, it's best to 
ignore it for now.

> I am still getting the 126 error from "Live CDP" and "Live LLDP".  I
> suspect they are a similar workaround, but dinner is waiting for me...

-- 
    Denis Ovsienko

Other related posts: