Bug 156 - Option to attach extra disk for Log folder in AMP

Review Request #284 — Created June 12, 2024 and submitted

apoorva.sn
AMP
AMP_3_6_0
156
pmurugaiyan, prajesh, shuinvy

Problem

Customer wants to attach extra disk for the log folder and want option to store the logs in the disk from UI

Solution

This is the Rest API part giving option to user to save logs in extra disk
1. is_external_drive_available endpoint returns if an external disk is available for storage
2. save_logs endpoint accepts input from user if the logs must be stored in external or internal drive
For 'external' the logs are stored in '/external/elasticsearch' location and for 'internal' in '/var/log/elasticsearch'.
For the external drive attached a partition must be created and mounted in the AMP using Wiki: https://arraynetworks.atlassian.net/wiki/spaces/AMP/pages/2263941177/Create+a+new+partition+on+Centos

Tested the above 2 API's in AMP and follwing is the response for both:
1. is_external_drive_available
{"is_external_drive_available": true}

  1. save_logs
    {"status": "success"}
    for external option the logs will be stored in '/external/elasticsearch' location
    for internal in '/var/log/elasticsearch'
Description From Last Updated

Can we call it as switch_log_location or soemthing related to the exact functionality?

pmurugaiyanpmurugaiyan

Please remove the debug messages.

pmurugaiyanpmurugaiyan

simply - secondary_drive

prajeshprajesh

This should be noun. We should call it as log_location. HTTP method will be a verb- GET/PUT/POST will specify the …

prajeshprajesh

change external to secondary everywhere..

prajeshprajesh

Is there a way to abstract out business logic out of the REST API handler ?

prajeshprajesh

do we run this process as root to start the elasticsearch

prajeshprajesh
pmurugaiyan
  1. 
      
  2. Can we call it as switch_log_location or soemthing related to the exact functionality?

  3. Please remove the debug messages.

  4. 
      
apoorva.sn
shuinvy
  1. Ship It!
  2. 
      
pmurugaiyan
  1. Ship It!
  2. 
      
prajesh
  1. 
      
  2. Is there a way to abstract out business logic out of the REST API handler ?

  3. do we run this process as root to start the elasticsearch

  4. 
      
prajesh
  1. 
      
  2. This should be noun. We should call it as log_location. HTTP method will be a verb- GET/PUT/POST will specify the action

  3. change external to secondary everywhere..

  4. 
      
apoorva.sn
Review request changed

Status: Closed (submitted)

Loading...