Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSM parameters containing a dot #985

Closed
stermeau opened this issue Aug 25, 2016 · 4 comments
Closed

TSM parameters containing a dot #985

stermeau opened this issue Aug 25, 2016 · 4 comments
Assignees
Labels
enhancement Adaptions and new features fixed / solved / done minor bug An alternative or workaround exists
Milestone

Comments

@stermeau
Copy link
Contributor

  • rear version (/usr/sbin/rear -V): Relax-and-Recover 1.17.2
  • OS version (cat /etc/rear/os.conf or lsb_release -a): RHEL 6
  • rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):
    PROGS=( "${PROGS[@]}" screen )
    GRUB_RESCUE=n
    USE_STATIC_NETWORKING=y
    BACKUP=TSM
    OUTPUT=ISO
    TIMESYNC=NTP
    AUTOEXCLUDE_MULTIPATH=y
    COPY_AS_IS=( "${COPY_AS_IS[@]}" )
    COPY_AS_IS_TSM=( "${COPY_AS_IS_TSM[@]}" /.tsm /.tsm_ora)
    POST_RECOVERY_SCRIPT='cp /etc/adsm/TSM.PWD /mnt/local/etc/adsm'
    SSH_ROOT_PASSWORD="XXXXX"
    ISO_PREFIX="rear-XXXX"
  • Brief description of the issue
    If dsm.sys includes an option that has a dot in its name, 'rear recover' fails with
    /usr/share/rear/verify/TSM/default/40_verify_tsm.sh: line 12: export: `TSM_SYS_INCLUDE.ENCRYPT=/.../*': not a valid identifier
  • Work-around, if any
    Replace 'tr a-z A-Z' by 'tr a-z. A-Z_' in 40_verify_tsm.sh
    See
    stermeau@f14bdce
@gdha gdha added enhancement Adaptions and new features minor bug An alternative or workaround exists labels Aug 25, 2016
@gdha gdha self-assigned this Aug 25, 2016
@gdha
Copy link
Member

gdha commented Aug 25, 2016

@stermeau How do we know it won't break other users rear/TSM setups?

@stermeau
Copy link
Contributor Author

stermeau commented Aug 26, 2016

@gdha This script loads all the TSM options in variables called TSM_SYS_XXX but only TSM_SYS_TCPSERVERADDRESS is ever used.
`
$ grep -r TSM_SYS /usr/share/rear/

/usr/share/rear/verify/TSM/default/40_verify_tsm.sh:while read KEY VALUE ; do echo "$KEY" | grep -q '*' && continue ; test -z "$KEY" && continue ; KEY="$(echo "$KEY" | tr a-z A-Z)" ; export TSM_SYS_$KEY="${VALUE//"}" ; done </opt/tivoli/tsm/client/ba/bin/dsm.sys

/usr/share/rear/verify/TSM/default/40_verify_tsm.sh:[ "${TSM_SYS_TCPSERVERADDRESS}" ]

/usr/share/rear/verify/TSM/default/40_verify_tsm.sh: ping -c 1 "${TSM_SYS_TCPSERVERADDRESS}" >&8 2>&1

/usr/share/rear/verify/TSM/default/40_verify_tsm.sh: StopIfError "Sorry, but cannot reach TSM Server ${TSM_SYS_TCPSERVERADDRESS}"

/usr/share/rear/verify/TSM/default/40_verify_tsm.sh: Log "TSM Server ${TSM_SYS_TCPSERVERADDRESS} seems to be up and running."
`

TSM has several options with a dot in their name like INCLUDE.FS or INCLUDE.ENCRYPT. The patch itself just replaces dots by underscores in the key name. If someone is using an option like this rear will fail during a restore

@gdha
Copy link
Member

gdha commented Aug 26, 2016

@stermeau OK you can request a pull request

@stermeau
Copy link
Contributor Author

@gdha Thanks. I have opened the pull request #986

gdha added a commit that referenced this issue Aug 29, 2016
Issue #985, TSM options with dot in their name
@gdha gdha added this to the Rear v1.19 milestone Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adaptions and new features fixed / solved / done minor bug An alternative or workaround exists
Projects
None yet
Development

No branches or pull requests

2 participants