Bug 1334529

Summary: Lmod error in tools/TermWidth.lua when terminal size is unknown
Product: [Fedora] Fedora Reporter: Dominik 'Rathann' Mierzejewski <dominik>
Component: LmodAssignee: Orion Poplawski <orion>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: orion
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Lmod-6.3.4-1.fc25 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-11 22:53:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dominik 'Rathann' Mierzejewski 2016-05-09 22:36:13 UTC
Description of problem:
I can see this error when lmod is called from /usr/lib/rpm/mpi.req:
/usr/bin/lua: /usr/share/lmod/lmod/libexec/../tools/TermWidth.lua:69: bad argument #2 to 'tonumber' (number expected, got boolean)

Version-Release number of selected component (if applicable):
Lmod-6.3.1-1.fc25.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Try building any MPI-enabled package in mock -r fedora-rawhide-x86_64

Actual results:
/usr/bin/lua: /usr/share/lmod/lmod/libexec/../tools/TermWidth.lua:69: bad argument #2 to 'tonumber' (number expected, got boolean)
stack traceback:
	[C]: in function 'tonumber'
	/usr/share/lmod/lmod/libexec/../tools/TermWidth.lua:69: in upvalue 'askSystem'
	/usr/share/lmod/lmod/libexec/../tools/TermWidth.lua:92: in function 'TermWidth'
	/usr/share/lmod/lmod/libexec/../tools/Banner.lua:54: in upvalue 'new'
	/usr/share/lmod/lmod/libexec/../tools/Banner.lua:65: in function 'Banner.banner'
	/usr/share/lmod/lmod/libexec/lmod:555: in function 'main'
	/usr/share/lmod/lmod/libexec/lmod:711: in main chunk
	[C]: in ?
/usr/share/lmod/lmod/init/sh: line 14: 80: command not found

Expected results:
No errors.

Additional info:
export COLUMNS=80
seems to work around the above.

Comment 1 Orion Poplawski 2016-05-11 03:21:33 UTC
Looks like this may have been a mistake in a cleanup commit upstream: https://github.com/TACC/Lmod/commit/1b8620fb2598aa178127f1a5aece11e13d3d5dde

Hopefully will get confirmation shortly.

Comment 2 Orion Poplawski 2016-05-11 22:53:21 UTC
This should be fixed with Lmod-6.3.4-1.fc25.  Reopen if it isn't.