Git Product home page Git Product logo

opennetworklinux's Introduction

Open Network Linux

The OCP Open Network Linux Project has been moved to maintenance mode, pending archival.

Check out the main/offical website at http://opennetlinux.org .

Open Network Linux (ONL) is a Linux distribution for bare metal switches. ONL builds an ONIE-compatible installer and a switch image which contains a complete Debian distribution with added drivers and configuration for running on bare metal switches.

Software License

Licenses for the software are described under the LICENSE file. Download or use of the software implies consent.

Documentation

Please see the docs directory for additional information.

alt text

opennetworklinux's People

Contributors

acctalex avatar applech avatar brandonchuang avatar carlroth avatar cfeng111 avatar cynthiainv avatar cytsai0409 avatar ingridcelestica avatar jakelin-ec avatar jnealtowns avatar johnsonyjlu avatar jonathantsai-qci avatar jostar-yang avatar kanjimonster avatar lewis-kang avatar odmyko avatar ozohad avatar phani-karanam avatar pjaipakdee avatar robertxyu avatar rohitmalaga avatar roylee123 avatar seanwu-ec avatar sergeypopovich-ord avatar shengzhou avatar sholeksandr avatar sonoble avatar spitchai avatar willyliu-ec avatar zhouzi88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opennetworklinux's Issues

errors: couldn't mount because of unsupported optional features, no 'ma1' , onlpdump

I 'git clone' and 'make docker' on 4/14 and build ONIE installer successfully.

During ONIE NOS installation, it has the following error (tested on AS7716-32X):

Installing boot files...
Installing boot-config...
EXT3-fs (sdb4): error: couldn't mount because of unsupported optional features (240)
EXT2-fs (sdb4): error: couldn't mount because of unsupported optional features (240)
Installing Open Network Linux Software Image (ONL-2.0.0_ONL-OS_2016-04-14.1034-d79158c_AMD64.swi)...
EXT3-fs (sdb6): error: couldn't mount because of unsupported optional features (240)
EXT2-fs (sdb6): error: couldn't mount because of unsupported optional features (240)

After installation, reboot to run NOS. It has the following issue:
1. Device "ma1" does not exist:
[ Starting Autoboot ]
[ Configuring Interfaces ]
/bin/ifup: line 76: can't create /proc/sys/net/ipv6/conf/ma1/autoconf: nonexistent directory
udhcpc: SIOCGIFINDEX: No such device
grep: /sys/class/net/ma1/operstate: No such file or directory
ifconfig: SIOCGIFFLAGS: No such device
Device "ma1" does not exist.

2. errors while running onlpdump:
SFPs:
01-01 00:10:49.296209 [x86_64_accton_as7716_32x] Unable to open the sfp_is_present_all device file.
Presence Bitmap: Error: E_INTERNAL
RX_LOS Bitmap: None

01-01 00:10:49.296285 [x86_64_accton_as7716_32x] Unable to read present status from port(0)

Accton AS7726-56X ONLP - locator LED

Accton AS7726-56X ONLP using libonlp-x86-64-accton-as7326-56x.so

Locator LED cannot be set to ON.

Code:

int COTS_onlp_Locator_LED_Ctl (int on_off)
{
int led, rc = 0;
onlp_oid_t cid;
onlp_led_info_t led_info;
onlp_led_mode_t set_mode = ONLP_LED_MODE_OFF;

debug_log (VXOS_TRACE_DEBUG, "START on_off=%d\n", on_off);
led = get_current_pdb()->onlp_loc_led;
if (led == 0)
{
	debug_log (VXOS_TRACE_ERROR, "LOCATOR LED is NOT defined in CDB\n");
	rc = -50;
} else
{
	cid = ONLP_LED_ID_CREATE(led);
	rc = onlp_led_info_get(cid, &led_info);
	debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d onlp_led_info_get rc=%d\n", led, cid, rc);
	debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d description='%s'\n", led, cid, led_info.hdr.description);
	debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d caps=%d 0x%08X\n", led, cid, led_info.caps, led_info.caps);
	debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d mode=%d\n", led, cid, led_info.mode);
	debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d status=%d\n", led, cid, led_info.status);

	if ((led_info.caps & ONLP_LED_CAPS_ON_OFF) == 0)
	{
		debug_log (VXOS_TRACE_ERROR, "LOCATOR LED does not have ON_OFF capacity\n");
		rc = -50;
	} else
	{
		if ((led_info.caps & COTS_LED_BLINKS) == 0)
		{
			get_current_pdb()->onlp_loc_led_cap_blinking = FALSE;
			if (on_off)
			{
				if ((led_info.caps & ONLP_LED_CAPS_RED) != 0)
					set_mode = ONLP_LED_MODE_RED;
				else if ((led_info.caps & ONLP_LED_CAPS_ORANGE) != 0)
					set_mode = ONLP_LED_MODE_ORANGE;
				else if ((led_info.caps & ONLP_LED_CAPS_YELLOW) != 0)
					set_mode = ONLP_LED_MODE_YELLOW;
				else if ((led_info.caps & ONLP_LED_CAPS_GREEN) != 0)
					set_mode = ONLP_LED_MODE_GREEN;
				else if ((led_info.caps & ONLP_LED_CAPS_BLUE) != 0)
					set_mode = ONLP_LED_MODE_BLUE;
				else if ((led_info.caps & ONLP_LED_CAPS_PURPLE) != 0)
					set_mode = ONLP_LED_MODE_PURPLE;
				else if ((led_info.caps & ONLP_LED_CAPS_AUTO) != 0)
					set_mode = ONLP_LED_MODE_AUTO;
			}
			debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d caps=0x%08X on_off=%d set_mode=%d\n",
					   led, cid, led_info.caps, on_off, set_mode);
			rc = onlp_led_mode_set(cid, set_mode);
			debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d onlp_led_mode_set %d rc=%d\n",
					   led, cid, set_mode, rc);
			debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d caps=0x%08X on_off=%d\n",
					   led, cid, led_info.caps, on_off);
			rc = onlp_led_set(cid, on_off);
			debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d onlp_led_set on_off=%d rc=%d\n",
					   led, cid, on_off, rc);
		} else
		{
			get_current_pdb()->onlp_loc_led_cap_blinking = TRUE;
			if (on_off)
			{
				if ((led_info.caps & ONLP_LED_CAPS_RED_BLINKING) != 0)
					set_mode = ONLP_LED_MODE_RED_BLINKING;
				else if ((led_info.caps & ONLP_LED_CAPS_ORANGE_BLINKING) != 0)
					set_mode = ONLP_LED_MODE_ORANGE_BLINKING;
				else if ((led_info.caps & ONLP_LED_CAPS_YELLOW_BLINKING) != 0)
					set_mode = ONLP_LED_MODE_YELLOW_BLINKING;
				else if ((led_info.caps & ONLP_LED_CAPS_GREEN_BLINKING) != 0)
					set_mode = ONLP_LED_MODE_GREEN_BLINKING;
				else if ((led_info.caps & ONLP_LED_CAPS_BLUE_BLINKING) != 0)
					set_mode = ONLP_LED_MODE_BLUE_BLINKING;
				else if ((led_info.caps & ONLP_LED_CAPS_PURPLE_BLINKING) != 0)
					set_mode = ONLP_LED_MODE_PURPLE_BLINKING;
				else if ((led_info.caps & ONLP_LED_CAPS_AUTO_BLINKING) != 0)
					set_mode = ONLP_LED_MODE_AUTO_BLINKING;

			}
			debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d caps=0x%08X on_off=%d set_mode=%d\n",
					   led, cid, led_info.caps, on_off, set_mode);
			rc = onlp_led_mode_set(cid, set_mode);
			debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d onlp_led_mode_set %d rc=%d\n",
					   led, cid, set_mode, rc);
		}
	}
	rc = onlp_led_info_get(cid, &led_info);
	debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d onlp_led_info_get rc=%d\n", led, cid, rc);
	debug_log (VXOS_TRACE_DEBUG, "LED %d cid=%d status=%d\n", led, cid, led_info.status);
}
debug_log (VXOS_TRACE_DEBUG, "DONE on_off=%d rc=%d\n", on_off, rc);
return (rc);

}

Trace:

COTS_onlp_Locator_LED_Ctl:242 START on_off=1
COTS_onlp_Locator_LED_Ctl:252 LED 2 cid=83886082 onlp_led_info_get rc=0
COTS_onlp_Locator_LED_Ctl:253 LED 2 cid=83886082 description='Chassis LED 2 (LOC LED)'
COTS_onlp_Locator_LED_Ctl:254 LED 2 cid=83886082 caps=4097 0x00001001
COTS_onlp_Locator_LED_Ctl:255 LED 2 cid=83886082 mode=0
COTS_onlp_Locator_LED_Ctl:256 LED 2 cid=83886082 status=1
COTS_onlp_Locator_LED_Ctl:285 LED 2 cid=83886082 caps=0x00001001 on_off=1 set_mode=12
COTS_onlp_Locator_LED_Ctl:288 LED 2 cid=83886082 onlp_led_mode_set 12 rc=0
COTS_onlp_Locator_LED_Ctl:291 LED 2 cid=83886082 caps=0x00001001 on_off=1
COTS_onlp_Locator_LED_Ctl:294 LED 2 cid=83886082 onlp_led_set on_off=1 rc=-10
COTS_onlp_Locator_LED_Ctl:325 LED 2 cid=83886082 onlp_led_info_get rc=0
COTS_onlp_Locator_LED_Ctl:326 LED 2 cid=83886082 status=1
COTS_onlp_Locator_LED_Ctl:328 DONE on_off=1 rc=0
COTS_onlp_Locator_LED_Ctl:242 START on_off=0
COTS_onlp_Locator_LED_Ctl:252 LED 2 cid=83886082 onlp_led_info_get rc=0
COTS_onlp_Locator_LED_Ctl:253 LED 2 cid=83886082 description='Chassis LED 2 (LOC LED)'
COTS_onlp_Locator_LED_Ctl:254 LED 2 cid=83886082 caps=4097 0x00001001
COTS_onlp_Locator_LED_Ctl:255 LED 2 cid=83886082 mode=0
COTS_onlp_Locator_LED_Ctl:256 LED 2 cid=83886082 status=1
COTS_onlp_Locator_LED_Ctl:285 LED 2 cid=83886082 caps=0x00001001 on_off=0 set_mode=0
COTS_onlp_Locator_LED_Ctl:288 LED 2 cid=83886082 onlp_led_mode_set 0 rc=0
COTS_onlp_Locator_LED_Ctl:291 LED 2 cid=83886082 caps=0x00001001 on_off=0
COTS_onlp_Locator_LED_Ctl:294 LED 2 cid=83886082 onlp_led_set on_off=0 rc=0
COTS_onlp_Locator_LED_Ctl:325 LED 2 cid=83886082 onlp_led_info_get rc=0
COTS_onlp_Locator_LED_Ctl:326 LED 2 cid=83886082 status=1
COTS_onlp_Locator_LED_Ctl:328 DONE on_off=0 rc=0

Library function onlp_led_set() with second parameter set to 1 returns -10 (ONLP_STATUS_E_UNSUPPORTED). Although LED capacities ( caps=0x00001001) indicates that it has ON_OFF and ORANGE capacity.

The same code on AS7312-54XS with library libonlp-x86-64-accton-as7312-54x.so works well
Trace:

COTS_onlp_Locator_LED_Ctl:242 START on_off=1
COTS_onlp_Locator_LED_Ctl:252 LED 2 cid=83886082 onlp_led_info_get rc=0
COTS_onlp_Locator_LED_Ctl:253 LED 2 cid=83886082 description='Chassis LED 2 (LOC LED)'
COTS_onlp_Locator_LED_Ctl:254 LED 2 cid=83886082 caps=4097 0x00001001
COTS_onlp_Locator_LED_Ctl:255 LED 2 cid=83886082 mode=0
COTS_onlp_Locator_LED_Ctl:256 LED 2 cid=83886082 status=1
COTS_onlp_Locator_LED_Ctl:285 LED 2 cid=83886082 caps=0x00001001 on_off=1 set_mode=12
COTS_onlp_Locator_LED_Ctl:288 LED 2 cid=83886082 onlp_led_mode_set 12 rc=0
COTS_onlp_Locator_LED_Ctl:291 LED 2 cid=83886082 caps=0x00001001 on_off=1
COTS_onlp_Locator_LED_Ctl:294 LED 2 cid=83886082 onlp_led_set on_off=1 rc=0
COTS_onlp_Locator_LED_Ctl:325 LED 2 cid=83886082 onlp_led_info_get rc=0
COTS_onlp_Locator_LED_Ctl:326 LED 2 cid=83886082 status=5
COTS_onlp_Locator_LED_Ctl:328 DONE on_off=1 rc=0
COTS_onlp_Locator_LED_Ctl:242 START on_off=0
COTS_onlp_Locator_LED_Ctl:252 LED 2 cid=83886082 onlp_led_info_get rc=0
COTS_onlp_Locator_LED_Ctl:253 LED 2 cid=83886082 description='Chassis LED 2 (LOC LED)'
COTS_onlp_Locator_LED_Ctl:254 LED 2 cid=83886082 caps=4097 0x00001001
COTS_onlp_Locator_LED_Ctl:255 LED 2 cid=83886082 mode=12
COTS_onlp_Locator_LED_Ctl:256 LED 2 cid=83886082 status=5
COTS_onlp_Locator_LED_Ctl:285 LED 2 cid=83886082 caps=0x00001001 on_off=0 set_mode=0
COTS_onlp_Locator_LED_Ctl:288 LED 2 cid=83886082 onlp_led_mode_set 0 rc=0
COTS_onlp_Locator_LED_Ctl:291 LED 2 cid=83886082 caps=0x00001001 on_off=0
COTS_onlp_Locator_LED_Ctl:294 LED 2 cid=83886082 onlp_led_set on_off=0 rc=0
COTS_onlp_Locator_LED_Ctl:325 LED 2 cid=83886082 onlp_led_info_get rc=0
COTS_onlp_Locator_LED_Ctl:326 LED 2 cid=83886082 status=1
COTS_onlp_Locator_LED_Ctl:328 DONE on_off=0 rc=0

Library function onlp_led_set() with second parameter set to 1 returns 0 (ONLP_STATUS_OK).
LED capacities ( caps=0x00001001) are the same as on AS7726-56X: ON_OFF and ORANGE capacity.
Function is called on timer every second tomake LED blinking. It blinks orange on this platform.

Accton ONLP Locator LED control

Current Accton OPNLP library for x86-64-accton-as7312-54xs-r0 would not allow to turn Locator LED on or off using ONLP libray API although onlp_led_info_get() call returns a structure where capability ONLP_LED_CAPS_ON_OFF is indicated. Both API's onlp_led_set() and onlp_led_mode_set() return error ONLP_STATUS_E_UNSUPPORTED.

My code:

// 1 - on, 0 - off
int COTS_onlp_Locator_LED_Ctl (int on_off)
{
	int rc = 0;
	onlp_oid_t cid;
	onlp_led_mode_t mode = (on_off) ? (ONLP_LED_MODE_ON) : (ONLP_LED_MODE_OFF);
	onlp_led_info_t led_info;

	debug_log (VXOS_TRACE_DEBUG, "START on_off=%d mode=%d\n", on_off, mode);
	cid = ONLP_LED_ID_CREATE(2);

	rc = onlp_led_info_get(cid, &led_info);
	debug_log (VXOS_TRACE_DEBUG, "LED 2 cid=%d onlp_led_info_get rc=%d\n", cid, rc);
	debug_log (VXOS_TRACE_DEBUG, "LED 2 cid=%d description='%s'\n", cid, led_info.hdr.description);
	debug_log (VXOS_TRACE_DEBUG, "LED 2 cid=%d mode=%d\n", cid, led_info.mode);
	debug_log (VXOS_TRACE_DEBUG, "LED 2 cid=%d caps=%d 0x%08X\n", cid, led_info.caps, led_info.caps);

	rc = onlp_led_set(cid, on_off);
	debug_log (VXOS_TRACE_DEBUG, "LED 2 id=%d cid=%d onlp_led_set on_off=%d rc=%d\n", Led_OIDs[1], cid, on_off, rc);

	rc = onlp_led_mode_set(cid, mode);
	debug_log (VXOS_TRACE_DEBUG, "LED 2 id=%d cid=%d onlp_led_mode_set mode=%d rc=%d\n", Led_OIDs[1], cid, mode, rc);
	return (rc);
}

My trace if this code execution:

COTS_onlp_Locator_LED_Ctl:228 LED 2 cid=83886082 onlp_led_info_get rc=0
COTS_onlp_Locator_LED_Ctl:229 LED 2 cid=83886082 description='Chassis LED 2 (LOC LED)'
COTS_onlp_Locator_LED_Ctl:230 LED 2 cid=83886082 mode=0
COTS_onlp_Locator_LED_Ctl:231 LED 2 cid=83886082 caps=4097 0x00001001
COTS_onlp_Locator_LED_Ctl:234 LED 2 id=83886082 cid=83886082 onlp_led_set on_off=1 rc=-10
COTS_onlp_Locator_LED_Ctl:237 LED 2 id=83886082 cid=83886082 onlp_led_mode_set mode=1 rc=-10
ERROR:HAL:s_halserver_proc_set_loc_led_rq:273 Error setting Locator LED to ON. rc=-10

Capabilities are 4097 or 0x00001001 - (ONLP_LED_CAPS_ON_OFF and ONLP_LED_CAPS_ORANGE)
but LED is not possible to turn ON.

x86-64-cel-redstone-xp platform-config ONIE grub error

I was checking ONL out on a switch in my lab, it's not directly on the HCL, but its a cel_redstone_xp platform so I figured I'd give it a shot. After a seemingly successful install and first couple of boots working fine I decided to check if I could boot back into ONIE. Selecting ONIE at grub it gives an error about chainloader1. I edited the grub entry and changed it to chainloader +1 and got into ONIE, so I think this is just a typo.
I looked it up at https://github.com/opencomputeproject/OpenNetworkLinux/blob/master/packages/platforms/celestica/x86-64/x86-64-cel-redstone-xp/platform-config/r0/src/lib/boot/grub.cfg#L19
and noticed it seems to be chainloader +1 on all the other platform configs except this one.

x86-64-accton-wedge100bf-32x-r0 - set LED mode - wrong color

I am using ONLP library libonlp-x86-64-accton-wedge100bf-32x.so to control LED's on the front panel of Barefoot Wedge 100BF-32X.
'Chassis LED 1 (SYS LED 2)' is used as a "Locator" LED since this platform does not have a designated locator as some others.
Call to onlp_led_info_get() for this LED returns capabilities 0x000F0C01 which means:
ONLP_LED_CAPS_ON_OFF = (1 << 0),
ONLP_LED_CAPS_RED = (1 << 10),
ONLP_LED_CAPS_RED_BLINKING = (1 << 11),
ONLP_LED_CAPS_GREEN = (1 << 16),
ONLP_LED_CAPS_GREEN_BLINKING = (1 << 17),
ONLP_LED_CAPS_BLUE = (1 << 18),
ONLP_LED_CAPS_BLUE_BLINKING = (1 << 19),

To set LED 2 blinking I am using onlp_led_mode_set().
When mode is ONLP_LED_MODE_GREEN_BLINKING it is OK - LED id blinking green as requested.

But when mode is set to ONLP_LED_MODE_RED_BLINKING it is actually blinking BLUE.
And the other way around: when mode is set to ONLP_LED_MODE_BLUE_BLINKING it is blinking RED.

Mode ONLP_LED_MODE_OFF is turning it off as requested.

Broken links on download pages

http://opennetlinux.org/binaries

Some links on the top level work, but almost everything under a subfolder leads to error page: "We're sorry, but something went wrong" or "The page you were looking for doesn't exist.".

Historical versions later than 2016.01.04.21.46.18cc76084b3104961117aa8434599c8c67a9a276/ and are broken.

Do we have instructions for onlpdv2?

Hi team:
We try onlps on onlpdv2 branch.

  1. localhost.onlp.debug.oid> verify
    localhost.onlp.debug.oid.verify> ?
    json
    localhost.onlp.debug.oid.verify> json
    error: 1 arguments are required for command 'json' (0 given)

How to use this command to test oid?

  1. Any instruction for the manifest?
    localhost.onlp.modules> manifest
    AIM
    IOF
    onlp
    onlplib
    x86_64_delta_ag9064v1
    onlp_platform_defaults
    sff
    cjson
    cjson_util
    timer_wheel
    OS
    uCli
    ELS
    BigList

Thank you for help.

Apt repository not signed

Hi,

I'm trying to figure out how to run ONL in a production environment. I've managed to build ONL from github and install it - but while installing packages with apt works, apt warns that the repository is not signed.

Is this working as intended?

root@localhost:~# apt update
Ign:1 http://apt.opennetlinux.org/debian unstable InRelease
Get:3 http://apt.opennetlinux.org/debian unstable Release
Ign:2 http://mirrors.edge.kernel.org/debian stretch InRelease            
Ign:4 http://apt.opennetlinux.org/debian unstable Release.gpg
Hit:5 http://mirrors.edge.kernel.org/debian stretch Release
Reading package lists... Done
E: The repository 'http://apt.opennetlinux.org/debian unstable Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Build issue in make ONL

Hello.
I am trying to build ONL of amd64 on debian8.8.
However, the error occurred according to the making procedure and the binary of ONL was not able to be made.

The procedure is as follows.

>git clone https://github.com/opencomputeproject/OpenNetworkLinux

>cd OpenNetworkLinux

>docker/tools/onlbuilder -8

>apt-cacher-ng

>source setup.env

>make amd64 #error with this command

root@debian:/OpenNetworkLinux# make amd64
make -C builds/amd64
make[1]: Entering directory '/OpenNetworkLinux/builds/amd64'
GEN pkgall
INFO:onlpm:Requiring prerequisite package onlp:amd64...
INFO:onlpm:Requiring prerequisite package onl-kernel-3.16-lts-x86-64-all:amd64...
INFO:onlpm:Requiring prerequisite package onl-kernel-4.9-lts-x86-64-all:amd64...
INFO:onlpm:Requiring prerequisite package onl-loader-initrd:amd64...
INFO:onlpm:Requiring prerequisite package onl-buildroot-initrd:amd64...
INFO:onlpm:Requiring prerequisite package onl-loader-initrd-files:all...
INFO:onlpm:Requiring prerequisite package onl-kernel-3.16-lts-x86-64-all:amd64...
INFO:onlpm:Requiring prerequisite package onl-kernel-4.9-lts-x86-64-all:amd64...
INFO:onlpm:Requiring prerequisite package onl-loader-initrd:amd64...
INFO:onlpm:Requiring prerequisite package onl-buildroot-initrd:amd64...
INFO:onlpm:Requiring prerequisite package onl-loader-initrd-files:all...
INFO:onlpm:Requiring prerequisite package onl-vendor-config-quanta:all...
INFO:onlpm:Requiring prerequisite package onl-vendor-config-onl:all...
INFO:onlpm:Requiring prerequisite package onl-bootd:all...
INFO:onlpm:Requiring prerequisite package onl-platform-modules-x86-64-quanta-ix1b-rglbmc:amd64...

INFO:onlpm:Requiring prerequisite package onl-vendor-alphanetworks-modules:amd64...
INFO:onlrfs:Updating /OpenNetworkLinux/REPO/jessie/packages/binary-amd64
DEBUG:onlrfs:Executing:make -C /OpenNetworkLinux/REPO/jessie/packages/binary-amd64
make[4]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
Updating Package Manifest...
dpkg-scanpackages: info: Wrote 205 entries to output Packages file.
INFO:onlrfs:Updating /OpenNetworkLinux/REPO/jessie/packages/binary-all
DEBUG:onlrfs:Executing:make -C /OpenNetworkLinux/REPO/jessie/packages/binary-all
make[4]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
Updating Package Manifest...
dpkg-scanpackages: info: Wrote 19 entries to output Packages file.
DEBUG:onlrfs:Executing:sudo rm -rf rootfs-amd64.d
DEBUG:onlrfs:Executing:sudo /usr/sbin/multistrap -d rootfs-amd64.d -f /tmp/tmp2S56Z1
Use of uninitialized value in join or string at /usr/sbin/multistrap line 1280.
Use of uninitialized value in join or string at /usr/sbin/multistrap line 1280.
multistrap 2.2.0 using /tmp/tmp2S56Z1
multistrap 2.2.0 using /tmp/tmp2S56Z1
Defaulting architecture to native: amd64
multistrap building amd64 multistrap on 'amd64'
I: Setting /OpenNetworkLinux/builds/amd64/rootfs/builds/rootfs-amd64.d/lib64 -> /OpenNetworkLinux/builds/amd64/rootfs/builds/rootfs-amd64.d/lib symbolic link.
Getting package lists: apt-get -o Apt::Architecture=amd64 -o Dir::Etc::TrustedParts=/OpenNetworkLinux/builds/amd64/rootfs/builds/rootfs-amd64.d/etc/apt/trusted.gpg.d -o Dir::Etc::Trusted=/OpenNetworkLinux/builds/amd64/rootfs/builds/rootfs-amd64.d/etc/apt/trusted.gpg.d/trusted.gpg -o Apt::Get::AllowUnauthenticated=true -o Apt::Get::Download-Only=true -o Apt::Install-Recommends=false -o Dir=/OpenNetworkLinux/builds/amd64/rootfs/builds/rootfs-amd64.d/ -o Dir::Etc=/OpenNetworkLinux/builds/amd64/rootfs/builds/rootfs-amd64.d/etc/apt/ -o Dir::Etc::Parts=/OpenNetworkLinux/builds/amd64/rootfs/builds/rootfs-amd64.d/etc/apt/apt.conf.d/ -o Dir::Etc::PreferencesParts=/OpenNetworkLinux/builds/amd64/rootfs/builds/rootfs-amd64.d/etc/apt/preferences.d/ -o APT::Default-Release=* -o Dir::State=/OpenNetworkLinux/builds/amd64/rootfs/builds/rootfs-amd64.d/var/lib/apt/ -o Dir::State::Status=/OpenNetworkLinux/builds/amd64/rootfs/builds/rootfs-amd64.d/var/lib/dpkg/status -o Dir::Cache=/OpenNetworkLinux/builds/amd64/rootfs/builds/rootfs-amd64.d/var/cache/apt/ update
Ign copy: ./ InRelease
Ign copy: ./ InRelease
Ign copy: ./ Release.gpg
Ign copy: ./ Release.gpg
Ign copy: ./ Release
Ign copy: ./ Release
Get:1 copy: ./ Packages [11.0 kB]
Ign copy: ./ Translation-en
Get:2 copy: ./ Packages [134 kB]
Ign copy: ./ Translation-en
Ign http://127.0.0.1:3142 jessie InRelease
Ign http://127.0.0.1:3142 unstable InRelease
Ign http://127.0.0.1:3142 jessie Release.gpg
Ign http://127.0.0.1:3142 unstable Release.gpg
Ign http://127.0.0.1:3142 jessie Release
Ign http://127.0.0.1:3142 unstable Release
Err http://127.0.0.1:3142 jessie/main amd64 Packages
401 Unauthorized
Ign http://127.0.0.1:3142 jessie/main Translation-en
Err http://127.0.0.1:3142 unstable/main amd64 Packages
401 Unauthorized
Ign http://127.0.0.1:3142 unstable/main Translation-en
Fetched 145 kB in 0s (648 kB/s)
W: Failed to fetch http://127.0.0.1:3142/mirrors.kernel.org/debian/dists/jessie/main/binary-amd64/Packages 401 Unauthorized
W: Failed to fetch http://127.0.0.1:3142/apt.opennetlinux.org/debian/dists/unstable/main/binary-amd64/Packages 401 Unauthorized
E: Some index files failed to download. They have been ignored, or old ones used instead.
apt update failed. Exit value: 100
DEBUG:onlrfs:Executing:sudo mount -t devtmpfs dev rootfs-amd64.d/dev
DEBUG:onlrfs:Executing:sudo mount -t proc proc rootfs-amd64.d/proc
mount: mount point rootfs-amd64.d/proc does not exist
DEBUG:onlrfs:Executing:sudo umount -l rootfs-amd64.d/dev rootfs-amd64.d/proc
umount: rootfs-amd64.d/proc: mountpoint not found
ERROR:onlrfs:Could not mount proc in new filesystem.
/OpenNetworkLinux/make/rfs.mk:36: recipe for target 'RFS' failed
make[3]: *** [RFS] Error 1
Traceback (most recent call last):
File "/OpenNetworkLinux/tools/onlpm.py", line 1265, in
pm.build(p)
File "/OpenNetworkLinux/tools/onlpm.py", line 951, in build
products = pg.build(dir_=dir_)
File "/OpenNetworkLinux/tools/onlpm.py", line 610, in build
self.gmake_locked("", 'Build')
File "/OpenNetworkLinux/tools/onlpm.py", line 585, in gmake_locked
ex=OnlPackageError('%s failed.' % operation))
File "/OpenNetworkLinux/tools/onlu.py", line 70, in execute
raise ex
onlpm.OnlPackageError: 'Build failed.'
/OpenNetworkLinux/make/pkg.mk:30: recipe for target 'pkgall' failed
make

I think the cause is a proxy setting.
However, I do not know which file to change

Please help me with you ideas.

x86-64-accton-wedge100bf-32x-r0 - transcievers bitmap is not updated on removal

x86-64-accton-wedge100bf-32x-r0

onlp_sfp_presence_bitmap_get() returns bitmap of transceivers present.
Insertion of the new transceiver causes bitmap change.
Removal of the previously inserted transceiver does not change bitmap, removed transceiver is still marked as present.

Compared to the same function for x86-64-accton-as7312-54x-r0. There it works properly.

libonlp-x86-64-accton-as5812-54x.so - onlp_psu_info_get() does not return PS present

Code
// PSU
rc = onlp_psu_init();
debug_log (VXOS_TRACE_DEBUG, "\nPSU\nonlp_psu_init rc=%d\n", rc);

for (i = 0; i < Psu_OIDs_cnt; ++i)
{
	cid = ONLP_PSU_ID_CREATE(i+1);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d id=%d cid=%d\n", i+1, Psu_OIDs[i], cid);
	rc = onlp_psu_info_get(cid, &psu_info);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d cid=%d onlp_psu_info_get rc=%d\n", i+1, cid, rc);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d cid=%d description='%s'\n", i+1, cid, psu_info.hdr.description);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d cid=%d status=%d\n", i+1, cid, psu_info.status);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d cid=%d caps=%d 0x%08X\n", i+1, cid, psu_info.caps, psu_info.caps);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d cid=%d mvin=%d\n", i+1, cid, psu_info.mvin);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d cid=%d mvout=%d\n", i+1, cid, psu_info.mvout);
}

Trace:

Nov 19 20:58:06 PFS5010 hal_main[1740]: PSU
Nov 19 20:58:06 PFS5010 hal_main[1740]: onlp_psu_init rc=0
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:178 PSU 1 id=67108865 cid=67108865
Nov 19 20:58:06 PFS5010 hal_main[1740]: Unable to read PSU(1) node(psu_present)
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:180 PSU 1 cid=67108865 onlp_psu_info_get rc=0
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:181 PSU 1 cid=67108865 description='PSU-1'
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:182 PSU 1 cid=67108865 status=0
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:183 PSU 1 cid=67108865 caps=0 0x00000000
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:184 PSU 1 cid=67108865 mvin=0
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:185 PSU 1 cid=67108865 mvout=0
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:178 PSU 2 id=67108866 cid=67108866
Nov 19 20:58:06 PFS5010 hal_main[1740]: Unable to read PSU(2) node(psu_present)
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:180 PSU 2 cid=67108866 onlp_psu_info_get rc=0
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:181 PSU 2 cid=67108866 description='PSU-2'
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:182 PSU 2 cid=67108866 status=0
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:183 PSU 2 cid=67108866 caps=0 0x00000000
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:184 PSU 2 cid=67108866 mvin=0
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:185 PSU 2 cid=67108866 mvout=0
Nov 19 20:58:06 PFS5010 hal_main[1740]: EMERGENCY:HAL:COTS_Init_ONLP:189

dhcp problem

the network dhcp was configed by NETAUTO=dhcp, and the ip is ok but the /etc/resolv.conf file is nothing.
there is other ways to resolved it.

What happened to ORC?

I'm fairly new to the world of networking let alone bare-metal switching, so I could be missing something very fundamental, but I'm struggling to work out how to get even a simple bridge network up on an AS4610-54T (which is listed in various places as supported).

Following installation the front panel ports don't appear as network interfaces, which I believe is to be expected as they are not directly visible to Linux, but instead are managed by a dedicated Broadcom ASIC. The documentation, however, makes reference to ORC and my understanding is that this is/was a RTNETLINK based daemon that exposed the front panel ports as standard linux network interfaces and allowed management using standard linux facilites such as network scripts.

I built the latest sources for Debian 8 using the provided docker build system, which I must say I really like, and installed the armel artifact onto the switch, however, orc doesn't appear to exist anymore? I'm aware of various alternatives such as FBOSS, SAI, etc... but none of these are really the same nor do they support the switch in question as far as I can decipher.

As part of further investigating this issue I installed a trial of Cumulus Linux and their switchd seems to do the same thing that I understand ORC does/did. However, the general attitude of Cumulus linux to security I found somewhat troubling. You have to install all packages from their apt repo, for which their is no out of band way to confirm their GPG key, and which does not appear to be kept up to date with the Debian repos. Installing packages from the Debian repos causes switchd to malfunction, and so you are reliant on Cumulus Linux to keep their software patched. This to me seems very akin to the vendor lock-in and associated detrimental effects on security and innovation that I was hoping bare-metal switches addressed?

Any help on how best to proceed would be much appreciated, a colleague and I have wasted the best part of a week bashing our heads against this problem to no avail. I notice that Cumulus linux comes with a load of kernel modules that are LGPL licensed - is it just a case of building these, installing them and then building and installing orc, or will this not work?

Support systemd

Hi,

I'm running OpenNetLinux with Debian 9. I tried installing systemd and systemd-sysv to see if ONL was systemd ready, I had no real expectations of it working - but it would be nice if it did.

Sadly, it does not work. It ends up in some sort of boot loop causing the boot script to fail as it tries to mount things twice.

[   24.390294] igb 0000:00:14.0 ma1: renamed from eth0
[   24.432290] ip (1360) used greatest stack depth: 13248 bytes left
[   25.649150] random: onl-mounts: uninitialized urandom read (16 bytes read)
[   25.868104] random: blkid: uninitialized urandom read (6 bytes read)
[   25.896338] random: blkid: uninitialized urandom read (6 bytes read)
[   26.211979] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[   26.237855] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)
[   26.261001] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[   26.283787] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
foname alias eth0 --> ma1
remapping interface eth0 --> ma1
INFO:onl-mounts:Running fsck on ONL-IMAGES [ /dev/sda5 ]...
INFO:onl-mounts:/dev/sda5 [ ONL-IMAGES ] is clean.
INFO:onl-mounts:Running fsck on ONL-DATA [ /dev/sda6 ]...
INFO:onl-mounts:/dev/sda6 [ ONL-DATA ] is clean.
INFO:onl-mounts:Running fsck on ONL-BOOT [ /dev/sda3 ]...
INFO:onl-mounts:/dev/sda3 [ ONL-BOOT ] is clean.
INFO:onl-mounts:Running fsck on ONL-CONFIG [ /dev/sda4 ]...
INFO:onl-mounts:/dev/sda4 [ ONL-CONFIG ] is clean.
INFO:PKI:Using existing private key.
INFO:PKI:Using existing certificate.
************************************************************
*
* Open Network Linux Loader
* 
*        Version: ONL-master
*             Id: 2018-06-09.16:02-afae91c
*
*       Platform: x86-64-accton-wedge-16x-r0
*            ma1: 54:ab:3a:05:fc:0a
*
************************************************************
[ boot-config ]
NETDEV=ma1
BOOTMODE=INSTALLED
SWI=images::latest


Press Control-C now to enter the interactive loader shell.

[ Starting Autoboot ]
[ Configuring Interfaces ]
[   29.835588] igb 0000:00:14.0 ma1: igb: ma1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[   29.837218] IPv6: ADDRCONF(NETDEV_UP): ma1: link is not ready
[   29.837221] 8021q: adding VLAN 0 to HW filter on device ma1
[   29.855292] ip (1458) used greatest stack depth: 13072 bytes left
[ BOOTMODE is in[   29.893891] IPv6: ADDRCONF(NETDEV_CHANGE): ma1: link becomes ready
stalled. ]
DEBUG:swiget:+ blkid
INFO:swiget:found 'latest' swi /mnt/onl/images/ONL-master_ONL-OS_2018-06-09.1602-afae91c_AMD64.swi
[ Found valid (current) image at /mnt/onl/data ]
recording SWI /mnt/onl/images/ONL-master_ONL-OS_2018-06-09.1602-afae91c_AMD64.swi --> /tmp/swiprep-lDuecu
[ Trying dir:data:/... ]
creating 1048576k of tmpfs in /tmp/boot-tmpfs-DT25qg
Mounting dir:data:/
DEBUG:swimount:+ blkid
DEBUG:swimount:+ ubinfo -a
ubinfo: error!: UBI is not present in the system
DEBUG:swimount:+[   30.558387] EXT4-fs (sda6): re-mounted. Opts: data=ordered
 mount -o rw,remount /mnt/onl/da[   30.574219] random: fast init done
ta
Switching rootfs[   33.552534] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[   33.575536] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[   33.598072] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
INRunning fsck on ONL-IMAGES [ /dev/sda5 ]...
INFO:onl-mounts:/dev/sda5 [ ONL-IMAGES ] is clean.
ERROR:onl-mounts:ONL-DATA (/dev/sda6) is mounted.
INFO:onl-mounts:Running fsck on ONL-BOOT [ /dev/sda3 ]...
INFO:onl-mounts:/dev/sda3 [ ONL-BOOT ] is clean.
INFO:onl-mounts:Running fsck on ONL-CONFIG [ /dev/sda4 ]...
INFO:onl-mounts:/dev/sda4 [ ONL-CONFIG ] is clean.
INFO:PKI:Using existing private key.
INFO:PKI:Using existing certificate.
************************************************************
*
* Open Network Linux Loader
* 
*        Version: ONL-master
*             Id: 2018-06-09.16:02-afae91c
*
*       Platform: x86-64-accton-wedge-16x-r0
*            ma1: 54:ab:3a:05:fc:0a
*
************************************************************
[ boot-config ]
NETDEV=ma1
BOOTMODE=INSTALLED
SWI=images::latest


Press Control-C now to enter the interactive loader shell.

[ Starting Autoboot ]
[ Configuring Interfaces ]
[ BOOTMODE is installed. ]

************************************************************
 ERROR 

 Unmounted /mnt/onl/data, disk boot cannot continue

************************************************************


************************************************************
 ERROR 

 The installed boot handler indicates an unrecoverable error. Autobooting cannot continue.

************************************************************


Welcome to the   shell.
Type 'help' for command help.

loader# mount
rootfs on / type rootfs (rw,size=4057604k,nr_inodes=1014401)
devtmpfs on /newroot/dev type devtmpfs (rw,relatime,size=1024k,nr_inodes=1014407,mode=755)
proc on /newroot/proc type proc (rw,relatime)
sysfs on /newroot/sys type sysfs (rw,relatime)
/dev/sda6 on /newroot type ext4 (rw,relatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=1024k,nr_inodes=1014407,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/sda5 on /mnt/onl/images type ext4 (rw,relatime,data=ordered)
/dev/sda3 on /mnt/onl/boot type ext4 (rw,relatime,data=ordered)
/dev/sda4 on /mnt/onl/config type ext4 (ro,relatime,data=ordered)

Would you be interested in a patch with systemd support / have plans to follow Debian and switch to systemd by default?

Should systemd call `/etc/boot.d/boot` script?

As far as I know, in inittab (for sysvinit) calls /etc/boot.d/boot when the system started
However, the systemd does not.
Should we add ONL init script (systemd service) for systemd?

ONL Build Issues

Hi,

I am trying to build ONL on Debian 8.2 VM which runs on Ubuntu Server 18.04 LTS
Kernel Version : Linux 4.1.4
Docker Version : 17

Please let me know how to fix these errors

Ign copy: ./ InRelease
Ign copy: ./ InRelease
Ign copy: ./ Release.gpg
Ign copy: ./ Release.gpg
Ign copy: ./ Release
Ign copy: ./ Release
Get:1 copy: ./ Packages [8134 B]
Ign copy: ./ Translation-en
Get:2 copy: ./ Packages [213 kB]
Ign copy: ./ Translation-en
Ign http://127.0.0.1:3142 jessie InRelease
Ign http://127.0.0.1:3142 unstable InRelease
Ign http://127.0.0.1:3142 jessie Release.gpg
Ign http://127.0.0.1:3142 unstable Release.gpg
Ign http://127.0.0.1:3142 jessie Release
Ign http://127.0.0.1:3142 unstable Release
Err http://127.0.0.1:3142 jessie/main amd64 Packages
503 Service Unavailable
Ign http://127.0.0.1:3142 jessie/main Translation-en
Err http://127.0.0.1:3142 unstable/main amd64 Packages
503 Service Unavailable
Ign http://127.0.0.1:3142 unstable/main Translation-en
Fetched 221 kB in 11s (19.7 kB/s)
W: Failed to fetch http://127.0.0.1:3142/mirrors.kernel.org/debian/dists/jessie/main/binary-amd64/Packages 503 Service Unavailable

W: Failed to fetch http://127.0.0.1:3142/apt.opennetlinux.org/debian/dists/unstable/main/binary-amd64/Packages 503 Service Unavailable

E: Some index files failed to download. They have been ignored, or old ones used instead.
apt update failed. Exit value: 100
INFO:onlrfs:[profiler] sudo /usr/sbin/multistrap -d rootfs-amd64.d -f /tmp/tmpOf9Ef_ : 12.3234260082 seconds (0.20539043347 minutes)
DEBUG:onlrfs:Executing:sudo mount -t devtmpfs dev rootfs-amd64.d/dev
INFO:onlrfs:[profiler] sudo mount -t devtmpfs dev rootfs-amd64.d/dev : 0.0104780197144 seconds (0.000174633661906 minutes)
DEBUG:onlrfs:Executing:sudo mount -t proc proc rootfs-amd64.d/proc
mount: mount point rootfs-amd64.d/proc does not exist
ERROR:onlrfs:Exception 'Could not mount proc in rfs.' in OnlRfsContext::enter
DEBUG:onlrfs:Executing:sudo umount -l rootfs-amd64.d/dev rootfs-amd64.d/proc
umount: rootfs-amd64.d/proc: mountpoint not found
ERROR:onlrfs:Could not unmount dev and proc
/root/OpenNetworkLinux/make/rfs.mk:36: recipe for target 'RFS' failed
make[3]: *** [RFS] Error 1
Traceback (most recent call last):
File "/root/OpenNetworkLinux/tools/onlpm.py", line 1282, in
pm.build(p)
File "/root/OpenNetworkLinux/tools/onlpm.py", line 967, in build
products = pg.build(dir_=dir_)
File "/root/OpenNetworkLinux/tools/onlpm.py", line 626, in build
self.gmake_locked("", 'Build')
File "/root/OpenNetworkLinux/tools/onlpm.py", line 601, in gmake_locked
ex=OnlPackageError('%s failed.' % operation))
File "/root/OpenNetworkLinux/tools/onlu.py", line 126, in execute
raise ex
onlpm.OnlPackageError: 'Build failed.'
/root/OpenNetworkLinux/make/pkg.mk:30: recipe for target 'pkgall' failed
make[2]: *** [pkgall] Error 1
/root/OpenNetworkLinux/make/subdirs.mk:15: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/root/OpenNetworkLinux/builds/amd64'
Makefile:23: recipe for target 'amd64' failed
make: *** [amd64] Error 2
Makefile:56: recipe for target 'docker' failed
make: *** [docker] Error 2

Thanks!

HCL update for Accton/Edge-Core platforms

Hi Steven,

Could you help update HCL for Accton/Edge-Core platforms by the following? Thanks in advance.

  1. Adding OpenNSL as vendor provided binaries - Yes*** for AS4600-54T, AS5710-54X, AS5712-54X, AS6712-32X and AS7712-32X.
  2. Adding OF-DPA as vendor provided binaries - Yes*** for AS5712-54X, AS6712-32X and AS7712-32X

libonlp-x86-64-accton-as7712-32x.so - onlp_psu_info_get() did not return power supply present

Code:

for (i = 0; i < Psu_OIDs_cnt; ++i)
{
	cid = ONLP_PSU_ID_CREATE(i+1);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d id=%d cid=%d\n", i+1, Psu_OIDs[i], cid);
	rc = onlp_psu_info_get(cid, &psu_info);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d cid=%d onlp_psu_info_get rc=%d\n", i+1, cid, rc);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d cid=%d description='%s'\n", i+1, cid, psu_info.hdr.description);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d cid=%d status=%d\n", i+1, cid, psu_info.status);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d cid=%d caps=%d 0x%08X\n", i+1, cid, psu_info.caps, psu_info.caps);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d cid=%d mvin=%d\n", i+1, cid, psu_info.mvin);
	debug_log (VXOS_TRACE_DEBUG, "PSU %d cid=%d mvout=%d\n", i+1, cid, psu_info.mvout);
}

Trace

Nov 19 22:51:36 vss-kbp-proto hal_main[463]: PSU
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: onlp_psu_init rc=0
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:178 PSU 1 id=67108865 cid=67108865
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: Unable to read PSU(1) node(psu_present)
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:180 PSU 1 cid=67108865 onlp_psu_info_get rc=0
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:181 PSU 1 cid=67108865 description='PSU-1'
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:182 PSU 1 cid=67108865 status=0
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:183 PSU 1 cid=67108865 caps=0 0x00000000
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:184 PSU 1 cid=67108865 mvin=0
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:185 PSU 1 cid=67108865 mvout=0
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:178 PSU 2 id=67108866 cid=67108866
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: Unable to read PSU(2) node(psu_present)
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:180 PSU 2 cid=67108866 onlp_psu_info_get rc=0
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:181 PSU 2 cid=67108866 description='PSU-2'
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:182 PSU 2 cid=67108866 status=0
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:183 PSU 2 cid=67108866 caps=0 0x00000000
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:184 PSU 2 cid=67108866 mvin=0
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:185 PSU 2 cid=67108866 mvout=0
Nov 19 22:51:36 vss-kbp-proto hal_main[463]: EMERGENCY:HAL:COTS_Init_ONLP:189

ONL bring up apt-update issue

Hi,

I have installed ONL ( ONL-2.0.0-ONL-OS-DEB8-2017-07-18.1642-40fc82b-AMD64-INSTALLED-INSTALLER ) on a QEMU VM.
It seems there is no shared library package available for ONL.
apt, wget, and every other normal Linux commands are throwing an error (
error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory )
I have assigned IP to ONL using dhclient eth1 command.
Is there any way i can access ONL from a terminal so that i can transfer the relevant files to the system and get it working.?
Also, using a flash drive seems not a working way as this is in a nested VM.
Could someone give thoughts on this? Thanks.

Question: Are ONLP API's thread safe?

Are ONLP API's reenter-able and thread safe?
Or user processes calling ONLP should have protection mechanism themselves?

This question is especially important in regard to Transceivers read and write operations.

This installer does not support the powerpc-as5700-96x-r01 platform.

Open Network Installer running under ONIE.
Installer Version: Open Network Linux 89f17d8 (powerpc.all,2017.10.02.18.47,89f17d8df68f835d1341f1c083466f70da8a6f64)
Detected platform: powerpc-as5700-96x-r01

Full Console Output
ONL.txt

This installer does not support the powerpc-as5700-96x-r01 platform.
Available platforms are:
powerpc-accton-as4600-54t-r0
powerpc-accton-as5610-52x-r0
powerpc-accton-as5700-96x-r0
powerpc-accton-as5710-54x-r0
powerpc-accton-as6700-32x-r0
powerpc-accton-as6700-32x-r1
powerpc-as4600-54t
powerpc-as5600-52x
powerpc-as5610-52x
powerpc-as5710-54x-r0a
powerpc-as5710-54x-r0b
powerpc-as6700-32x-r0
powerpc-dni-7448-r0
powerpc-quanta-lb9-r0
powerpc-quanta-lb9a-r0
powerpc-quanta-ly2-r0
Installation cannot continue.

When will x86_64_accton_AS5916_54xmk_r0 be supported?

Hi
I have recently acquired accton_5916_54xmk, and trying to install the latest ONL pkge, but failed.
and found that the latest ONL pkg doesn't have support for 5916_xmk yet.
anyone has any idea when it will be supported?
what needs to be done in order to support that model in ONL?
I apologize for asking so fundamental questions, I am new to the group.
many thanks for the help.
Fei-

Apr 22 04:11:48 onie-host local0.info os-install: modprobe: can't change directory to '/lib/modules': No such file or directory
Apr 22 04:11:48 onie-host local0.info os-install: Archive: /tmp/sfx-QTOuXF/onie-installer.zip
Apr 22 04:11:48 onie-host local0.info os-install: inflating: preinstall.sh
Apr 22 04:11:48 onie-host local0.info os-install: Hello from preinstall
Apr 22 04:11:48 onie-host local0.info os-install: Chroot is /tmp/sfx-QTOuXF/initrd-pWRbuQ
Apr 22 04:11:49 onie-host local0.info os-install: Traceback (most recent call last):
Apr 22 04:11:49 onie-host local0.info os-install: File "/usr/bin/onl-install", line 6, in
Apr 22 04:11:49 onie-host local0.info os-install: import onl.install.App
Apr 22 04:11:49 onie-host local0.info os-install: File "/usr/lib/python2.7/dist-packages/onl/install/App.py", line 21, in
Apr 22 04:11:49 onie-host local0.info os-install: import ConfUtils, BaseInstall
Apr 22 04:11:49 onie-host local0.info os-install: File "/usr/lib/python2.7/dist-packages/onl/install/ConfUtils.py", line 14, in
Apr 22 04:11:49 onie-host local0.info os-install: from onl.sysconfig import sysconfig
Apr 22 04:11:49 onie-host local0.info os-install: File "/usr/lib/python2.7/dist-packages/onl/sysconfig/init.py", line 13, in
Apr 22 04:11:49 onie-host local0.info os-install: from onl.platform.current import OnlPlatform
Apr 22 04:11:49 onie-host local0.info os-install: File "/usr/lib/python2.7/dist-packages/onl/platform/current.py", line 81, in
Apr 22 04:11:49 onie-host local0.info os-install: OnlPlatform = import_subsystem_platform_class()
Apr 22 04:11:49 onie-host local0.info os-install: File "/usr/lib/python2.7/dist-packages/onl/platform/current.py", line 76, in import_subsystem_platform_class
Apr 22 04:11:49 onie-host local0.info os-install: m = importlib.import_module('%s.platform.%s' % (subsystem, platform_module))
Apr 22 04:11:49 onie-host local0.info os-install: File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
Apr 22 04:11:49 onie-host local0.info os-install: import(name)
Apr 22 04:11:49 onie-host local0.info os-install: ImportError: No module named x86_64_accton_as5916_54xmk_r0
Apr 22 04:11:48 onie-host local0.info os-install: 65287 blocks
Apr 22 04:11:48 onie-host local0.info os-install: modprobe: can't change directory to '/lib/modules': No such file or directory

ONL build issue

Hi,
I am stuck with the following error in ONL build on Debian 8.2 VM at the top of Ubuntu 18.04 server,kernel version:Linux-4.14.

W: Failed to fetch http://127.0.0.1:3142/mirrors.kernel.org/debian/dists/jessie/main/binary-amd64/Packages 503 Service Unavailable

W: Failed to fetch http://127.0.0.1:3142/apt.opennetlinux.org/debian/dists/unstable/main/binary-amd64/Packages 503 Service Unavailable

E: Some index files failed to download. They have been ignored, or old ones used instead.
apt update failed. Exit value: 100

Kindly help me out.

Thanks

ONL installer gets unknown onie_platform in latest ONIE

Hello @carlroth, @jnealtowns , @cbrune ,

In latest ONIE, I had removed machine.conf from the initrd image. i.e., machine.conf is generated at ONIE run-time dynamically rather than putting a static one in the image. ONL had been revised to use onie-sysinfo on Dec 27 (#280 ). We found ONL install failed because it unpacks the image to execute onie-sysinfo to get onie_platform. In the unpacked environment, machine.conf is not existent so that onie-sysinfo will reply unknown to ONL installer. It will try to import a module named unknown:

Traceback (most recent call last):
  File "/usr/bin/onl-install", line 6, in <module>
    import onl.install.App
  File "/usr/lib/python2.7/dist-packages/onl/install/App.py", line 21, in <module>
    import ConfUtils, BaseInstall
  File "/usr/lib/python2.7/dist-packages/onl/install/ConfUtils.py", line 14, in <module>
    from onl.sysconfig import sysconfig
  File "/usr/lib/python2.7/dist-packages/onl/sysconfig/__init__.py", line 13, in <module>
    from onl.platform.current import OnlPlatform
  File "/usr/lib/python2.7/dist-packages/onl/platform/current.py", line 62, in <module>
    OnlPlatform = import_subsystem_platform_class()
  File "/usr/lib/python2.7/dist-packages/onl/platform/current.py", line 57, in import_subsystem_platform_class
    m = importlib.import_module('%s.platform.%s' % (subsystem, platform_module))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named unknown
Install failed.

It looks that it is necessary to keep machine.conf in the image to make the installer go smoothly. But onie-sysinfo still lacks machine-live.conf (which is also generated dynamically at ONIE run-time) for calculating the real onie_platform. We need to discuss how to fix the issue.

I would appreciate your opinions. Thank you very much.

Cheers,
David

Dell not supported for the latest build?

I pulled the repo and built the amd64 image, but during the installation I get

Apr 26 08:53:57 onie-host local0.info os-install: ImportError: No module named x86_64_dell_s4000_c2338_r0
Install failed. See log messages above for details

I started to browse my build and in generated manifest file I do not see any dell modules:

  "platforms": [
    "x86-64-alphanetworks-snx60a0-486f-r0", 
    "x86-64-delta-agc7648a-r0", 
    "x86-64-delta-wb2448-r0", 
    "x86-64-mlnx-msn2700-r0", 
    "x86-64-mlnx-msn2100-r0", 
    "x86-64-mlnx-msn2410-r0", 
    "x86-64-agema-agc7648-r0", 
    "x86-64-cel-seastone-r0", 
    "x86-64-cel-redstone-xp-r0", 
    "x86-64-quanta-ly8-rangeley-r0", 
    "x86-64-quanta-ly6-rangeley-r0", 
    "x86-64-quanta-ly9-rangeley-r0", 
    "x86-64-quanta-ix1-rangeley-r0", 
    "x86-64-kvm-x86-64-r0", 
    "x86-64-accton-as5812-54x-r0", 
    "x86-64-accton-as5712-54x-r0", 
    "x86-64-accton-as6712-32x-r0", 
    "x86-64-accton-as6812-32x-r0", 
    "x86-64-accton-as7512-32x-r0", 
    "x86-64-accton-as5812-54t-r0", 
    "x86-64-facebook-wedge100-r0", 
    "x86-64-accton-as7716-32x-r0", 
    "x86-64-accton-as5822-54x-r0", 
    "x86-64-accton-as5912-54x-r0", 
    "x86-64-accton-as7712-32x-r0", 
    "x86-64-accton-wedge-16x-r0", 
    "x86-64-accton-as7312-54x-r0", 
    "x86-64-accton-as5512-54x-r0"
  ],

BTW : Is OpenRouteCache (ORC) still supported for Dells?

get error when "make docker"

....
Multistrap system installed successfully in /home2/kang/OCP/OpenNetworkLinux/builds/powerpc/rootfs/builds/rootfs-powerpc.d/.

DEBUG:onlrfs:Executing:sudo mount -t devtmpfs dev rootfs-powerpc.d/dev
DEBUG:onlrfs:Executing:sudo mount -t proc proc rootfs-powerpc.d/proc
DEBUG:onlrfs:Executing:sudo cp /usr/bin/qemu-ppc-static rootfs-powerpc.d/usr/bin
INFO:onlrfs:dpkg-configure filesystem...
DEBUG:onlrfs:Executing:sudo chroot rootfs-powerpc.d /tmp/configure.sh
chroot: failed to run command /tmp/configure.sh': Exec format error DEBUG:onlrfs:Executing:sudo umount -l rootfs-powerpc.d/dev rootfs-powerpc.d/proc ERROR:onlrfs:Post Configuration failed. make[2]: *** [RFS] Error 1 make[2]: Leaving directory/home2/kang/OCP/OpenNetworkLinux/builds/powerpc/rootfs/builds'
ERROR:onlpm:'Build failed.'
make[1]: *** [pkgall] Error 1
make[1]: Leaving directory `/home2/kang/OCP/OpenNetworkLinux/builds/powerpc/rootfs'
make: *** [ppc] Error 2

HCL update for Interface Masters platforms.

Please update HCL for IMT by adding OpenNSL as vendor provided binaries - Yes***.
We have them for all the platforms.

Broadcom providing it for our HW thru github but for 3.5.0.54 kernel and only for n2948-6xl. IMT provides them for any platforms that we have under ONL.

ONL install not support ONIE new structure

When I install ONL on a switch with latest ONIE installed, the python script of "platform/current.py" of packages/base/all/vendor-config-onl/src/python/onl, needs to parse /etc/machine.conf with "onie_platform=" string. However, the latest version of ONIE machine.conf is revised by nesting other configure files, machine-build.conf, which lacks of onie_platform, kindly refer to machine.conf in https://github.com/opencomputeproject/onie/blob/master/rootconf/default/etc/machine.conf. May I know if there is a plan to keep up with ONIE change!

unable to "build by hand"

root@CicadaBuildServer:/home2/kang/OCP/OpenNetworkLinux# docker/tools/onlbuilder -8
[ ok ] Enabling additional executable binary formats: binfmt-support.
root@CicadaBuildServer:/home2/kang/OCP/OpenNetworkLinux# source setup.env
bash: setup.env: No such file or directory
root@CicadaBuildServer:/home2/kang/OCP/OpenNetworkLinux# ls -la
total 8
drwxr-xr-x 2 root root 4096 Feb 17 04:24 .
drwxr-xr-x 3 root root 4096 Feb 17 04:24 ..

squashfs4.2.tar.gz: not in gzip format

git clone ONL
cd ONL
make docker

Saving to: `/home/vitaliy/GITHUB/OpenNetworkLinux/packages/base/any/initrds/buildroot/builds/buildroot-mirror/dl/squashfs4.2.tar.gz.tmp'

100%[================================================================================================================================================================================================================>] 16,116      62.8K/s   in 0.3s    

2016-02-01 15:56:12 (62.8 KB/s) - `/home/vitaliy/GITHUB/OpenNetworkLinux/packages/base/any/initrds/buildroot/builds/buildroot-mirror/dl/squashfs4.2.tar.gz.tmp' saved [16116/16116]

>>> squashfs 4.2 Extracting
gzip -d -c /home/vitaliy/GITHUB/OpenNetworkLinux/packages/base/any/initrds/buildroot/builds/buildroot-mirror/dl/squashfs4.2.tar.gz | tar --strip-components=1 -C /home/vitaliy/GITHUB/OpenNetworkLinux/packages/base/any/initrds/buildroot/builds/buildroot-x86_64/build/squashfs-4.2  -xf -

gzip: /home/vitaliy/GITHUB/OpenNetworkLinux/packages/base/any/initrds/buildroot/builds/buildroot-mirror/dl/squashfs4.2.tar.gz: not in gzip format
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
make[4]: *** [/home/vitaliy/GITHUB/OpenNetworkLinux/packages/base/any/initrds/buildroot/builds/buildroot-x86_64/build/squashfs-4.2/.stamp_extracted] Error 2
make[4]: Leaving directory `/home/vitaliy/GITHUB/OpenNetworkLinux/packages/base/any/initrds/buildroot/builds/buildroot-mirror'
make[3]: *** [buildroot-x86_64] Error 2
make[3]: Leaving directory `/home/vitaliy/GITHUB/OpenNetworkLinux/packages/base/any/initrds/buildroot/builds'
make[2]: *** [buildroot-initrd-amd64.cpio.gz] Error 2
make[2]: Leaving directory `/home/vitaliy/GITHUB/OpenNetworkLinux/packages/base/amd64/initrds/buildroot/builds'
ERROR:onlpm:'Build failed.'
/tmp/tmp7HDuit/tmp/tmplHknja/tmp/tmpfKmdRQ/tmp/tmpBHlUi9/tmp/tmpnU3e_1/tmp/tmpYkqFpFmake[1]: *** [pkgall] Error 1
make[1]: Leaving directory `/home/vitaliy/GITHUB/OpenNetworkLinux/packages/base'
make: *** [amd64] Error 2
vitaliy@onlbuilder7:~$

ONL build issue

Hi,
I am not able to build ONl source code ..Kindly help
Steps Done

#> git clone https://github.com/opencomputeproject/OpenNetworkLinux
#> cd OpenNetworkLinux
#> export VERSION=8
#> make docker

Error

INFO:onlrfs:dpkg-configure filesystem...
DEBUG:onlrfs:Executing:sudo chroot rootfs-powerpc.d /tmp/configure.sh
chroot: failed to run command '/tmp/configure.sh': No such file or directory
DEBUG:onlrfs:Executing:sudo umount -l rootfs-powerpc.d/dev rootfs-powerpc.d/proc
INFO:onlrfs:[profiler] sudo umount -l rootfs-powerpc.d/dev rootfs-powerpc.d/proc : 0.0785911083221 seconds (0.00130985180537 minutes)
ERROR:onlrfs:Post Configuration failed.
/home/user/Open_Network_Lin/OpenNetworkLinux/make/rfs.mk:36: recipe for target 'RFS' failed
make[3]: *** [RFS] Error 1
Traceback (most recent call last):
File "/home/user/Open_Network_Lin/OpenNetworkLinux/tools/onlpm.py", line 1277, in
pm.build(p)
File "/home/user/Open_Network_Lin/OpenNetworkLinux/tools/onlpm.py", line 962, in build
products = pg.build(dir_=dir_)
File "/home/user/Open_Network_Lin/OpenNetworkLinux/tools/onlpm.py", line 621, in build
self.gmake_locked("", 'Build')
File "/home/user/Open_Network_Lin/OpenNetworkLinux/tools/onlpm.py", line 596, in gmake_locked
ex=OnlPackageError('%s failed.' % operation))
File "/home/user/Open_Network_Lin/OpenNetworkLinux/tools/onlu.py", line 126, in execute
raise ex
onlpm.OnlPackageError: 'Build failed.'
/home/user/Open_Network_Lin/OpenNetworkLinux/make/pkg.mk:30: recipe for target 'pkgall' failed
make[2]: *** [pkgall] Error 1
/home/user/Open_Network_Lin/OpenNetworkLinux/make/subdirs.mk:15: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/home/user/Open_Network_Lin/OpenNetworkLinux/builds/powerpc'
Makefile:23: recipe for target 'powerpc' failed
make: *** [powerpc] Error 2
make: *** [docker] Error 2

'make docker' Error message -> can not create onlp-x86-64-accton-as7716-32x-r0_1.0.0_amd64.deb

INFO:onlpm:Rebuilding onlp-x86-64-accton-as7716-32x-r0:amd64...
make[3]: Entering directory /home/kang/OCP_0321/OpenNetworkLinux/packages/platforms/accton/x86-64/x86-64-accton-as7716-32x/onlp/builds' make[3]: warning: -jN forced in submake: disabling jobserver mode. /home/kang/OCP_0321/OpenNetworkLinux/sm/infra/builder/unix/dependmodules.mk:65: /x86_64_accton_as7716_32x.mk: No such file or directory make[4]: *** **No rule to make target/x86_64_accton_as7716_32x.mk'.** Stop.
make[3]: * [all] Error 1
make[3]: Leaving directory `/home/kang/OCP_0321/OpenNetworkLinux/packages/platforms/accton/x86-64/x86-64-accton-as7716-32x/onlp/builds'
ERROR:onlpm:'Build failed.'
/tmp/tmpggTNlDE
RROR**:onlrfs:Failed to build all required packages.

Accton ONLP library bug

Inside the library (fani.c) is the function which takes info from the filesystem and fills the structure. In Accton case:
https://github.com/opencomputeproject/OpenNetworkLinux/blob/master/packages/platforms/accton/x86-64/x86-64-accton-as7312-54xs/onlp/builds/src/module/src/fani.c

Fan tray of Accton platform has two fans - front and rear.
First – front fan speed is read and set to the element "rpm " of structure onlp_fan_info_t (lines 135 – 144)
Then rear fans speed is read and assigned TO THE SAME field of the structure overwriting front fan speed if rear fan is slower (lines 146-160).

As a result, my calling function is getting only one value, whichever is smaller – front or rear – undetermined.
For me it is not acceptable. A would like Accton to make a fix.

Since onlp_fan_info_t is generic and cannot be changed I suggest that Accton library uses 12 fans objects with unique object id’s instead of 6 they currently have. Two objects for one single fan tray, one for the front fan in a tray, another for the rear fan.

[ONLPv2][sfp.c] Need to put onlp_sfp_control_flags_get function behind onlp_sfp_is_present

Hi

In onlpv2-sfp.c

[OpenNetworkLinux\packages\base\any\onlp\src\onlp\module\src\sfp.c]

[int onlp_sfp_info_get(onlp_oid_t oid, onlp_sfp_info_t* info)]

if(ONLP_FAILURE(rv = onlp_sfp_control_flags_get(oid, &info->controls))) {
        AIM_LOG_ERROR("%{onlp_oid}: sfp_info_get: sfp_control_flags_get returned %{onlp_status}",
                      oid, rv);
        return rv;
    }

if(ONLP_FAILURE(rv = onlp_sfp_is_present(oid))) {
    AIM_LOG_ERROR("%{onlp_oid}: sfp_info_get: is_present returned %{onlp_status}",
                  oid, rv);
    return rv;
}

I think we need to put function

[onlp_sfp_control_flags_get]

behind

[onlp_sfp_is_present]

to make sure sfp is present when we want to get the control value.

Am I right?

ONLP onlp_sfp_eeprom_read shifts QSFP EEPROM data

libonlp-x86-64-accton-as7312-54x.so
Gives QSFP EEPROM data properly:

Accton 7312:

Port 53 onlp_sfp_eeprom_read rc=0 sfp_eeprom=0x1aca3c0
QSFP: Dump 256 bytes
: 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 0d 00 00 0f 00 00 00 00 00 00 00 00 00 00 00 00 ?..?............
10: 00 00 00 00 00 00 17 87 00 00 81 89 00 00 00 00 ......??..??....
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 .............?..
60: 00 00 00 00 f0 0f 00 f1 f0 00 00 00 00 00 00 00 ....??.??.......
70: 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff 00 ................
80: 0d 10 0c 04 00 00 00 40 40 02 00 05 67 00 00 32 ????...@@?.?g..2
90: 00 00 00 00 46 49 4e 49 53 41 52 20 43 4f 52 50 ....FINISAR CORP
A0: 20 20 20 20 07 00 90 65 46 54 4c 34 31 30 51 45 ?.?eFTL410QE
B0: 32 43 20 20 20 20 20 20 41 20 42 68 07 d0 46 97 2C A Bh??F?
C0: 00 01 04 d0 4d 51 50 30 35 4c 4e 20 20 20 20 20 .???MQP05LN
D0: 20 20 20 20 31 34 30 31 31 30 20 20 0a 00 00 53 140110 ?..S
E0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Vendor info is full and at appropriate offsets:
Vendor offset 148 (0x94), length 16
Part Number at 168 (0xA8) length 16
Serial number at 196 (0xC4) length 16

The same function call with libonlp-x86-64-accton-wedge100bf-32x.so with the same Transceiver inserted gives incorrect data.

Accton Wedge100BF:

Port 0 onlp_sfp_eeprom_read rc=0 sfp_eeprom=0x7f53000008e0
QSFP: Dump 256 bytes
: 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 0d 00 00 00 00 00 00 00 00 00 00 18 00 81 00 00 ?..........?.?..
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff ................
40: 0d 0c 00 00 40 00 67 00 00 00 46 4e 53 52 43 52 ??[email protected]...FNSRCR
50: 20 20 07 90 46 4c 31 51 32 20 20 20 41 42 07 46 ??FL1Q2 AB?F
60: 00 04 4d 53 32 4c 20 20 20 20 31 30 31 20 0a 00 .?MS2L 101 ?.
70: 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 ........
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Vendor name starts at 0x4A and has every other symbol skipped. Same for other vendor info.
It seems that every other byte of the EEPROM is missing.

Implement `onl-support` command

Hi Guys,

I find ONL doesn't have support bundle command. May I ask any roadmap on it? if not, maybe I can help implement it for support our customer who using ONL platform

Any suggestion or comment?

compile error while building onlp lib -- because of new update in AIM module

make -C packages/base/amd64/onlp
make[1]: Entering directory /home2/kang/OCP_0318/OpenNetworkLinux/packages/base/amd64/onlp' INFO:onlpm:Requiring prerequisite package onlp:amd64... INFO:onlpm:Rebuilding onlp:amd64... make[2]: Entering directory/home2/kang/OCP_0318/OpenNetworkLinux/packages/base/amd64/onlp/builds'
Compiling[ release ]: AIM::aim_daemon.c
Compiling[ release ]: onlplib::i2c.c
Compiling[ release ]: onlp_platform_defaults::sfpi.c
Compiling[ release ]: onlp_platform_defaults::sysi.c
Compiling[ release ]: sff::sff.c
Compiling[ release ]: sff::sff_enums.c
LinkingShared[release]: libonlp-platform-defaults-module::libonlp-platform-defaults.so
Compiling[ release ]: AIM::aim_daemon.c
Compiling[ release ]: onlplib::i2c.c
Compiling[ release ]: onlp_platform_defaults::sfpi.c
Compiling[ release ]: onlp_platform_defaults::sysi.c
Compiling[ release ]: sff::sff.c
Compiling[ release ]: sff::sff_enums.c
LinkingShared[release]: libonlp-platform-module::libonlp-platform.so
Compiling[ release ]: AIM::aim_daemon.c
Compiling[ release ]: onlplib::i2c.c
Compiling[ release ]: onlp::fan.c
Compiling[ release ]: onlp::led.c
Compiling[ release ]: onlp::onlp_config.c
In file included from /home2/kang/OCP_0318/OpenNetworkLinux/sm/infra/modules/AIM//module/src/aim_daemon.c:26:0:
/home2/kang/OCP_0318/OpenNetworkLinux/sm/infra/modules/AIM//module/inc/AIM/aim_config.h:333:2: error: #error AIM_CONFIG_INCLUDE_DAEMONIZE requires AIM_CONFIG_INCLUDE_MAIN. Disable AIM_CONFIG_INCLUDE_DAEMONIZE or enable AIM_CONFIG_INCLUDE_MAIN.

ONL Build Issue

Hi,

I am facing this error. What could possible be the reason for this error and how to fix it?

W: Failed to fetch http://127.0.0.1:3142/mirrors.kernel.org/debian/dists/jessie/main/binary-amd64/Packages 503 Service Unavailable

W: Failed to fetch http://127.0.0.1:3142/apt.opennetlinux.org/debian/dists/unstable/main/binary-amd64/Packages 503 Service Unavailable

E: Some index files failed to download. They have been ignored, or old ones used instead.
apt update failed. Exit value: 100

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.