Re: setting INTERACTIVITY back to "not set"?

Nathan Stratton Treadway <[email protected]> Tue, 14 Nov 2017 18:01:07 -0500
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <[email protected]>
On Tue, Nov 14, 2017 at 12:59:42 -0500, Jean-Louis Martineau wrote:
> Nathan,
> 
> Can you try the attached patch?

Yep, with the patch applied, I can successfully override to "not set" on
the command line (both the global setting and per-storage):

=====
# su backup -lc 'amadmin TestBackup config' | egrep "^[[:space:]]*INTERACT|DEFINE STORAGE"
INTERACTIVITY         "inter_tty_email"
DEFINE STORAGE TestBackup {
      INTERACTIVITY       "inter_tty_email"
DEFINE STORAGE TestOffsite {
      INTERACTIVITY       "inter_tty"

# su backup -lc 'amadmin TestBackup config -ointeractivity=' | egrep "^[[:space:]]*INTERACT|DEFINE STORAGE"
INTERACTIVITY         ""
DEFINE STORAGE TestBackup {
      INTERACTIVITY       ""
DEFINE STORAGE TestOffsite {
      INTERACTIVITY       "inter_tty"


# su backup -c 'amcheck -s TestBackup -ostorage=TestOffsite' 
Amanda Tape Server Host Check
-----------------------------
NOTE: Holding disk '/amanda/TestBackup-holding': 413192 MB disk space available, using 412992 MB
ERROR: Failed to open /dev/tty: No such device or address
Server check took 0.126 seconds
(brought to you by Amanda 3.5)

# su backup -c 'amcheck -s TestBackup -ostorage=TestOffsite -ostorage:TestOffsite:interactivity=' 
Amanda Tape Server Host Check
-----------------------------
NOTE: Holding disk '/amanda/TestBackup-holding': 413192 MB disk space available, using 412992 MB
ERROR: No acceptable volumes found
Server check took 0.137 seconds
(brought to you by Amanda 3.5)
=====

... and also in the amanda.conf storage definition:

=====
# egrep -i "^[[:space:]]*INTERACT|DEFINE STORAGE" /etc/amanda/TestBackup/amanda.conf
interactivity "inter_tty_email"
define storage TestBackup {
define storage TestOffsite {
    interactivity ""

# su backup -lc 'amadmin TestBackup config' | egrep "^[[:space:]]*INTERACT|DEFINE STORAGE"
INTERACTIVITY         "inter_tty_email"
DEFINE STORAGE TestBackup {
      INTERACTIVITY       "inter_tty_email"
DEFINE STORAGE TestOffsite {
      INTERACTIVITY       ""
=====


However, in my testing I noticed that amgetconf treats a blank
interactivity as "no such parameter".  I don't remember off-hand
how that worked before applying the patch, but it is different from
other options:

=====
# su backup -lc 'amadmin TestBackup config' | egrep -A1
"^[[:space:]]*INTERACT|DEFINE STORAGE"
INTERACTIVITY         "inter_tty_email"
TAPERSCAN             "taper_lexical"
--
DEFINE STORAGE TestBackup {
      COMMENT             ""
--
      INTERACTIVITY       "inter_tty_email"
      SET-NO-REUSE        no
--
DEFINE STORAGE TestOffsite {
      COMMENT             ""
--
      INTERACTIVITY       ""
      SET-NO-REUSE        no

# amgetconf TestBackup storage:TestOffsite:comment

# amgetconf TestBackup storage:TestOffsite:interactivity
amgetconf: no such parameter "storage:TestOffsite:interactivity"
=====


Similarly for the global parameter (i.e. if I comment out all
"interactivity" lines from my amanda.conf):

=====
~# su backup -lc 'amadmin TestBackup config' | egrep "^PRINTER|^INTERACTIVITY"
PRINTER               ""
INTERACTIVITY         ""
# amgetconf TestBackup printer

# amgetconf TestBackup interactivity
amgetconf: no such parameter "interactivity"
=====


(Looks like amgetconf also gives "no such parameter" error for
unset/empty taperscan and policy:

=====
# amgetconf TestBackup taperscan                                 
taper_lexical
# amgetconf TestBackup taperscan -otaperscan=
amgetconf: no such parameter "taperscan"


# amgetconf TestBackup storage:TestBackup:policy
TestBackup
# amgetconf TestBackup storage:TestBackup:policy -ostorage:TestBackup:policy=
amgetconf: no such parameter "storage:TestBackup:policy"
=====

)

					Nathan

----------------------------------------------------------------------------
Nathan Stratton Treadway  -  [email protected]  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239