[pdm-devel] [PATCH datacenter-manager 2/3] fix #7179: cli: admin: expose acme commands
Gabriel Goller
g.goller at proxmox.com
Wed Jan 28 10:26:11 CET 2026
[...]
> [...]
>
> > diff --git a/cli/admin/src/main.rs b/cli/admin/src/main.rs
> > index bcaa0a6..15114c9 100644
> > --- a/cli/admin/src/main.rs
> > +++ b/cli/admin/src/main.rs
> > @@ -9,6 +9,7 @@ use proxmox_router::RpcEnvironment;
> > use proxmox_schema::api;
> > use proxmox_sys::fs::CreateOptions;
> >
> > +mod acme;
> > mod remotes;
> > mod support_status;
> >
> > @@ -21,13 +22,17 @@ async fn run() -> Result<(), Error> {
> > &pdm_api_types::AccessControlConfig,
> > pdm_buildcfg::configdir!("/access"),
> > )?;
> > + proxmox_acme_api::init(pdm_buildcfg::configdir!("/acme"), false)?;
> > +
> > proxmox_log::Logger::from_env("PDM_LOG", proxmox_log::LevelFilter::INFO)
> > + .stderr_on_no_workertask()
> > .stderr()
> > .init()?;
>
> Doing this actually prints all messages logged outside a workertask
> *twice*, since this adds two subscribers that will print to stdout.
>
> I think it would make more sense to:
>
> proxmox_log::Logger::from_env("PDM_LOG", proxmox_log::LevelFilter::INFO)
> .tasklog_pbs()
> .stderr()
> .init()?;
>
> ... which should print *all* messages to stderr and messages from within
> a task log will also be stored in the task log.
>
> Maybe also ask Gabriel about these, he did a lot of work on logging.
>
> @Gabriel, would my proposal make sense here?
Yep, looks good!
We can also deprecate `tasklog_pbs` in favor of a more generic `tasklog`
function. This change is ok because pve's tasklog implementation is
quite different from pbs, so we won't use this for pve workers anytime
soon.
> >
> > server::context::init()?;
> >
> > let cmd_def = CliCommandMap::new()
> > + .insert("acme", acme::acme_mgmt_cli())
> > .insert("remote", remotes::cli())
> > .insert(
> > "report",
>
More information about the pdm-devel
mailing list