Don't put newlines in a single error message. This will end in syslog, and will make a mess of it.
Also, you probably want to `join("," keys(%$cephcfg))` for better readability.