Project

General

Profile

Bug #5091

illumos.sh env file's LOCKNAME definition is busted

Added by Josef Sipek almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
tools - gate/build tools
Start date:
2014-08-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

The line:

export LOCKNAME="$(basename -- "$CODEMGR_WS")_nightly.lock" 

causes LOCKNAME to be equal to "--_nightly.lock" which causes all nightly runs to try to create the same lock file /tmp/--_nightly.lock. While this is ok on a single-user system that never runs multiple unreleated nightlys, it is only a matter of time before multi-user systems run into this problem. (It gets really annoying if you have an automated system like Jenkins locking out everyone from doing a nightly for hours on end.)

This used to work and the commit for bug 450 introduced the regression.


Related issues

Related to illumos gate - Feature #450: RFE: Do a small illumos.sh cleanupResolved2010-12-06

Actions

History

#1

Updated by Yuri Pankov almost 6 years ago

Or is it our /usr/bin/basename that is busted not treating the '--' as 'no more options'?

#2

Updated by Rich Lowe almost 6 years ago

/usr/bin/basename is that way for apparent compatibility reasons.

That and whether a 2nd argument is ignored are the only differences between bin and xpg4 basename

#3

Updated by Electric Monk almost 6 years ago

  • Status changed from New to Closed
  • % Done changed from 30 to 100

git commit 60a61f7adabc73a7a0cb70d200ac2a6735f4a6e8

commit  60a61f7adabc73a7a0cb70d200ac2a6735f4a6e8
Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Date:   2014-08-15T20:08:15.000Z

    5092 env files don't need to define LOCKNAME by default
    5091 illumos.sh env file's LOCKNAME definition is busted
    Reviewed by: Dan McDonald <danmcd@omniti.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF