Code from the reactive layer. for the 2nd service, db.sshconfigured looks to be true and hence not entering here.
@when 'db.ready'
@when_not 'db.sshconfigured'
function configure_sshkeys(){
juju-log "************************In db available function ***********"
#hostname=$(relation_call --state=db.available get_remotehostname) || true
#juju-log "I got the remote host anme as $hostname"
key=$(relation_call --state=db.available get_sshkeys) || true
juju-log "I got the ssh key - $key"
dbnames=$(relation_call --state=db.available get_dbnames) || true
juju-log "I got db names - $dbnames"