Skip to content

fix(workflows): add the image's Pegasus system properties to ~/.pegasusrc - #669

Closed
kthare10 wants to merge 1 commit into
developfrom
fix/pegasus-system-properties
Closed

kthare10 wants to merge 1 commit into
developfrom
fix/pegasus-system-properties

Conversation

@kthare10

Copy link
Copy Markdown
Contributor

Problem

/etc/pegasus/pegasus.properties sets pegasus.monitord.encoding = json and the AMQP workflow catalog (msgs.pegasus.isi.edu), the same as on ACCESS Pegasus. In Studio it is never read:

  • The packaged Pegasus lives in a venv, so the planner's pegasus.home.sysconfdir is /usr/lib/pegasus/venv/lib/python3.13/site-packages/Pegasus/data/etc, not /etc/pegasus.
  • Planning usually runs on the submit host, which has none of the image's files.

Checked in a hosted pod: a fresh run's planned pegasus.*.properties had neither key, and monitord.log listed only the two SQLite sinks.

Change

On every start, docker/entrypoint.sh adds each property from /etc/pegasus/pegasus.properties to ~/.pegasusrc. That file is in the shared home, and its lines already appear in every run's planned properties (the site-catalog settings arrive this way).

  • A key already in ~/.pegasusrc is left alone, even with an empty value, so a user can override a property or turn the AMQP sink off.
  • Keys are matched as fixed strings, so the dots in a property name are not treated as wildcards.
  • Workflows don't need to change: a project's own pegasus.properties still takes precedence.
  • The OOD image reuses this entrypoint and gets the same behaviour.

Tests

  • tests/test_pegasus_system_properties.py (9 tests) runs the entrypoint block with a temporary ~/.pegasusrc. It covers adding to an existing file, creating a missing one, keeping a user's key, a second run adding nothing, dotted and prefix keys, comments and a missing trailing newline, and a missing system file.
  • pytest 1069 passed. There are no frontend changes.

Not verified yet

Nobody has tested this live on the :develop image. After a restart:

  • ~/.pegasusrc should contain the two lines.
  • A new run's planned properties should include them.
  • monitord should log an AMQP sink.

The submit host must be able to reach msgs.pegasus.isi.edu:5672.

Closes #668

…usrc

/etc/pegasus/pegasus.properties (monitord JSON encoding and the AMQP
workflow catalog) was never read. The packaged Pegasus lives in a venv
whose sysconfdir is venv/.../Pegasus/data/etc, and planning usually runs
on the submit host, which has none of the image's files. A fresh hosted
run's planned properties had neither key, and monitord wrote only to
SQLite.

On every start, the entrypoint now copies each property into
~/.pegasusrc, which every plan reads wherever it runs. A key the user
already set there, even to an empty value, is left alone.

Closes #668
@kthare10

Copy link
Copy Markdown
Contributor Author

Not doing this in Studio. The cause is in Pegasus's 6.0 packaging: the venv build's sysconfdir is inside the venv, so /etc/pegasus/pegasus.properties is ignored on every host. It will be fixed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant