diff --git a/lib/jqueue.py b/lib/jqueue.py index 4bb339604765792655ac9291bec7198c766c8d4b..23e1d3bb8c3b84bee2542bbfe072224b93a62b95 100644 --- a/lib/jqueue.py +++ b/lib/jqueue.py @@ -1395,6 +1395,8 @@ class JobQueue(object): row.append(job.start_timestamp) elif fname == "end_ts": row.append(job.end_timestamp) + elif fname == "lock_status": + row.append(job.lock_status) elif fname == "summary": row.append([op.input.Summary() for op in job.ops]) else: diff --git a/man/gnt-job.sgml b/man/gnt-job.sgml index 2fa73074745af410d5f254bb11e430a90b65e206..27db07b55bc2e9bd6b59a2267eda53a14fc8eea9 100644 --- a/man/gnt-job.sgml +++ b/man/gnt-job.sgml @@ -219,6 +219,18 @@ <simpara>the list of opcode end times</simpara> </listitem> </varlistentry> + <varlistentry> + <term>lock_status</term> + <listitem> + <simpara>the lock status (useful for debugging) formatted as + <quote>[waiting|acquiring]/[locklevel]/[lockname]/[shared|exclusive]</quote>. + Locklevel describes the type of lock (either + <quote>instance</quote>, <quote>node</quote> or + <quote>cluster</quote>). Lockname is a list of names or + <quote>ALL</quote> to describe all entities of the lock type. + </simpara> + </listitem> + </varlistentry> </variablelist> </para> diff --git a/scripts/gnt-job b/scripts/gnt-job index 89f246766fecc203ae5d30b5b6736629a5d8542c..e6fcea5f1d864c712af11f1fee71b6ec626f8451 100755 --- a/scripts/gnt-job +++ b/scripts/gnt-job @@ -81,6 +81,7 @@ def ListJobs(opts, args): "start_ts": "Start", "end_ts": "End", "received_ts": "Received", + "lock_status": "LockStatus", } else: headers = None @@ -104,6 +105,8 @@ def ListJobs(opts, args): val = FormatTimestamp(val) elif field in ("opstart", "opend"): val = [FormatTimestamp(entry) for entry in val] + elif field == "lock_status" and not val: + val = "-" row[idx] = str(val)