dentproject / dentOS

dentOS SwitchDev based NOS
Other
200 stars 58 forks source link

onie-shell:runner failed #206

Open mgheorghe opened 1 year ago

mgheorghe commented 1 year ago

type onie-shell in a dent device arm64-delta-tn48m-poe-dn-r0 and observe it will fail.

Linux dentlab-infra2 5.15.11-gd75daea83a47-dirty #1 SMP PREEMPT Sat Jan 14 01:56:34 UTC 2023 aarch64
Last login: Fri Mar 10 00:40:53 2023 from 10.23.164.83
root@dentlab-infra2:~# onie-shell
ERROR:onie-shell:runner failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/onl/install/ShellApp.py", line 80, in main
    code = app.run()
  File "/usr/lib/python2.7/dist-packages/onl/install/ShellApp.py", line 225, in run
    with OnieBootContext(log=self.log) as ctx:
  File "/usr/lib/python2.7/dist-packages/onl/install/ShellApp.py", line 183, in __enter__
    if self.mtd.mounts:
AttributeError: ProcMtdParser instance has no attribute 'mounts'
root@dentlab-infra2:~#

(works on other onie enabled devices, non DENT)

mgheorghe commented 1 year ago

this functionality will be really helpful to be fixed for automated regression

taraschornyiplv commented 1 year ago

looks like an issue with one mtd partition name one-shell checks for partition mane "onie" https://github.com/dentproject/dentOS/blob/988026a9637ed50cad58f846270a523b0966fcec/packages/base/all/vendor-config-onl/src/python/onl/install/ShellApp.py#L170

on arm64-delta-tn48m-poe-dn-r0


cat /proc/mtd
dev:    size   erasesize  name
mtd0: 003f0000 00001000 "uboot"
mtd1: 00010000 00001000 "uboot-env"
mtd2: 00c00000 00001000 "ONIE"

and on arm64-accton_as5114_48x-r0

root@dentlab-agg2:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00200000 00001000 "uboot"
mtd1: 00010000 00001000 "uboot-env"
mtd2: 00df0000 00001000 "onie"
vikumarks commented 1 year ago

@taraschornyiplv it's a first issue when we have mtd2 is "onie" it goes to onie-shell and when i try below commands , i get an error

root@dentlab-infra1:~# onie-shell
/ # onie-nos-install http://10.xx.xxx.x/downloads/DENTOS-HEAD_ONL-OS9_2023-05-09.0522-988026a_ARM64_INSTALLED_INSTALLER
Info: Attempting http://10.xx.xxx.x/downloads/DENTOS-HEAD_ONL-OS9_2023-05-09.0522-988026a_ARM64_INSTALLED_INSTALLER ...
Connecting to 10.xx.xxx.x (10.xx.xxx.x:80)
wget: can't open '/var/tmp/installer': No such file or directory

When i create the missing folder /var/tmp and try a command i get the error

/ # onie-nos-install http://10.xx.xxx.x/downloads/DENTOS-HEAD_ONL-OS9_2023-05-09.0522-988026a_ARM64_INSTALLED_INSTALLER
Info: Attempting http://10.xx.xxx.x/downloads/DENTOS-HEAD_ONL-OS9_2023-05-09.0522-988026a_ARM64_INSTALLED_INSTALLER ...
Connecting to 10.xx.xxx.x (10.xx.xxx.x:80)
installer            100% |**********************************************************************************************************************************************************************************************************************************************|   508M  0:00:00 ETA
cat: can't open '/var/run/install.rc': No such file or directory
sh: 0: unknown operand
Failure: Unable to install image: http://10.xx.xxx.x/downloads/DENTOS-HEAD_ONL-OS9_2023-05-09.0522-988026a_ARM64_INSTALLED_INSTALLER

Now if i create /var/run folder and run it gain gets

Failure: Unable to install image: http://10.xx.xxx.x/downloads/DENTOS-HEAD_ONL-OS9_2023-05-09.0522-988026a_ARM64_INSTALLED_INSTALLER

taraschornyiplv commented 1 year ago

@carlroth can you please take a look at this issue?

rothcar commented 1 year ago

when did mtd partitions become case sensitive

rothcar commented 1 year ago

we can either fix the kernel (the mtd partition layout is IIRC part of the DTS) or we can make the installer partition check be case-insensitive, @taraschornyiplv I believe your analysis is correct