search cancel

REST API and WEB UI Configuration with USS

book

Article ID: 216786

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

We have already configured REST API and WEB UI but we found a potential issue with the way the product is set up to use USS (Unix System Services). It has to do with the ZFS that comes with ESP  that needs to be mounted as RDWR in USS.  We can see there is the potential of losing some data (logs) when implementing a new release of the product.    Let me give you some details of our customer system.

STCs names:

ESPTREST this is the STC for the REST API
ESPTIX this is the STC for the WEB UI

The ZFS that comes with CA ESP WLM is mounted at IPL time at mountpoint :

/_PRDS/ESP/CD7YUSS.   

This is the entry in BPXPRMxx in SYS1.PARMLIB:

MOUNT
  MOUNTPOINT('/_PRDS/ESP/CD7YUSS')
  FILESYSTEM('OMVS.ESP.AAW1.V&SYSR1..CD7YUSS.ZFS')
  TYPE(ZFS)
  MODE(RDWR)

We have already successfully configured both started tasks and these start and work ok. We see that both STCs create and update files (logs) while running and these files live in the same ZFS .

ESPTREST STC updates files in /_PRDS/ESP/CD7YUSS/rest/ directory when running. Files created/updated seem to be some sort of logs for this started task.

ESPTIX STC  updates files in /_PRDS/ESP/CD7YUSS/webUI/DB/ directory when it runs. Likewise, these files seem to be some type of log.


The issue we see is that the ZFS that is mounted as Read/Write will contains a combination of code and run time files required for the STCs to run, plus the other files (logs) created by ESPTREST and ESPTIX STCs while running. 

All the  software our customer runs is maintained in a repository system, and any update done to the product requires to ship the entire product to the customer system, and implemented on the alternate SYSRES via an IPL. The updated product will include a new ZFS so all the files updated by ESPTREST and ESPTIX  in the old ZFS  will be lost. 

Has this issue been reported by any other customer ? Is there a way around this?  We tried mounting the ZFS as READ only but  ESPTREST and ESPTIX failed to start and we get the following messages in the started tasks log:

FileNotFoundException: ./esp-rest-api.log (EDC5141I Read-only file system.)
FileNotFoundException: ./audit-esp-rest-api.log (EDC5141I Read-only file system)

When we re-mount the ZFS as RDWR, then both  ESPTREST and ESPTIX STCs start ok. But as mentioned before, in the ZFS there is combination of code, run time and locally created files (created by the two started tasks).  These files created by  ESPTREST and ESPTIX will be lost when we implement a new version/release of ESP

 

Environment

Release : 12.0

Component : REST API

Resolution

The following in our sample RESTOPTS:

 

#---------------------------------------------------------------------#

# Enter the path to where the ESP REST API runtime logs #

# will be stored #

# #

# Example: #

# ESPREST_LOGS=/u/users/esp/rest/logs #

#---------------------------------------------------------------------#

export ESPREST_LOGS="${ESPREST_HOME}/logs"

 

And it seems to work well when set to another path.

#---------------------------------------------------------------------#
# Enter the path to where the ESP REST API runtime logs               #
# will be stored                                                      #
#                                                                     #
# Example:                                                            #
# ESPREST_LOGS=/u/users/esp/rest/logs                                 #
#---------------------------------------------------------------------#

export ESPREST_LOGS="${ESPREST_HOME}/logs"


this works in my case.
Type  Perm  Permission  Changed-EST5EDT   Owner      ------Size  Filename              
Dir    777   rwxrwxrwx  2021-06-02 09:47  SMIMA27          8192  .                     
Dir    777   rwxrwxrwx  2021-02-16 12:30  SMIMA27          8192  ..                    
File   644   rw-r--r--  2021-06-02 09:47  CYBSTQA             0  audit-esp-rest-api.log
File   644   rw-r--r--  2021-06-02 09:47  CYBSTQA             0  audit-espmsapi.log    
File   644   rw-r--r--  2021-06-02 09:47  CYBSTQA           403  esp-rest-api.log      
File   644   rw-r--r--  2021-06-02 09:47  CYBSTQA           144  espmsapi.log         
these has been created into the other uss path