xBis7 commented on PR #3948:
URL: https://github.com/apache/ozone/pull/3948#issuecomment-1315384447

   @fapifta @errose28 Thanks for taking a look. 
   
   > DefaultCertificateClient also uses it to determine where to store the 
certificate of an entity, and where to store the key material for the 
certificate.
   The implementation of these certificate client methods will have an effect 
for SCM, Ozone Manager, Ozone Recon, and Ozone DataNodes, as none of the 
component specific certificate client overrides these methods from the 
DefaultCertificateClient.
   
   @fapifta I don't think that this change affects any of this.
   That's the current code
   ```
       this.metadatDir = this.configuration.get(HDDS_METADATA_DIR_NAME,
           configuration.get(OZONE_METADATA_DIRS,
               configuration.get(HDDS_DATANODE_DIR_KEY)));
   ```
   `HDDS_METADATA_DIR_NAME` is the default config and if it's not set then 
`OZONE_METADATA_DIRS` is used. If `OZONE_METADATA_DIRS` is not set then 
`HDDS_DATANODE_DIR_KEY` will be used. We are only removing this last option. 
   
   In any case, if  `OZONE_METADATA_DIRS` is not set, then all the datanodes 
will crash and we will end up having a cluster where all datanodes are down and 
SCM will be using a datanode disk to store it's certificates. 
   
   If we have multiple volumes as @errose28 mentioned
   
   > We would never want cert info on hdds.datanode.dir anyways since this is 
specified multiple times for each datanode volume
   
   The config gets the path for the last volume and then stores the 
certificates under it.
   
   > It seems like there should be a way for components to specify their 
preferred storage directory. 
   
   From `HddsConfigKeys`
   
   ```
     // In any real cluster where performance matters, the SCM, OM and DN
     // metadata locations must be configured explicitly.
     public static final String OZONE_METADATA_DIRS = "ozone.metadata.dirs";
   ```
   But that doesn't seem to be the case, since we can't really avoid specifying 
`ozone.metadata.dirs`. I agree that every component should have it's own 
metadata dir. Currently, we are setting a db dir and a ratis dir.
   
   > Also it is an interesting philosophical question whether HDDS_METADATA_DIR 
or OZONE_METADATA_DIR should take precedence for OM and for Recon, as those are 
Ozone services, while which should take precedence for SCM and DN as those are 
HDDS services... :)
   
   Since we already have other directories for each component, what if there 
was also a metadata dir? For instance, for scm we have 
   ```
   ozone.scm.ha.ratis.storage.dir
   ozone.scm.db.dirs
   ```
   and there would also be  an `ozone.scm.metadata.dir`  config.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to