Gems version problem affecting dashboard widgets?

On my test server, an upgrade was performed earlier from 1.8.18 → 2.0.8
There were also incremental upgrades to 2.0.9, 2.0.10 and finally today, to 2.0.13.

OnDemand 2.0.13 is updated and the service is running. The app pinning in the dashboard is failing, with the following output in the dashboard.

            • Could not render widget '{:pinned_apps=>4}' because of error 

Missing partial widgets/_{:pinned_apps=>4} with {:locale=>[:en], :formats=>[:html], :variants=>, :handlers=>[:raw, :erb, :html, :builder, :ruby, :md, :markdown, :coffee, :jbuilder]}. Searched in: * “/var/www/ood/apps/sys/dashboard/app/views” * “/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.9/gems/ood_appkit-1.1.5/app/views”

Avoiding app pinning (comment out references to pinned apps in ondemand.d/ondemand.yml) removes the message. But I’m not comfortable that in my runtime the reference to “…/gems/2.7/ondemand/2.0.9” remains, after the update to 2.0.13. I can’t quite see how to bring the gems environment up-to-date.

Thanks,
~ Em

So the gem path is this: we’re looking for ood_appkit-1.1.5 and that’s the first place the Ruby runtime found it. If you removed the 2.0.9 gems, it’d find it in 2.0.13. So there’s no issue there.

You’re actual issue makes me think there’s something wrong with the structure of the YAML. I was able to tell from the name of the widget in the error message, you see its {:name => 4} (a map with 1 key value pair) when it should just be name. I was able to replicate and generate this image (I already had the 2 for testing).

Here’s the configuration I’m testing with, with a comment on the erroneous entry.

dashboard_layout:
  rows:
  - columns:
    - width: 12
      widgets: [ pinned_apps ]
  - columns:
    - width: 12
      widgets: motd
  - columns:
    - width: 4
      widgets: bad_syntax
    - width: 4
      widgets: doesnt_exist

    # this one is the wrong yaml structure. widgets are an array of strings (1 single string is also allowed)
    - widgets:
        - bad_format: 4
      width: 4

Thanks so much, Jeff. This is great. To clarify on the gems, I can remove all these directories, except of course the most recent, 2.0.13:

[mrd20@hpcviz stopprocs]$ ls -lrt /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/
total 16
drwxr-xr-x 9 root root 4096 May 19 17:13 2.0.8
drwxr-xr-x 9 root root 4096 May 27 17:16 2.0.9
drwxr-xr-x 9 root root 4096 Jun 22 17:36 2.0.10
drwxr-xr-x 9 root root 4096 Jul 20 19:12 2.0.13

I’ll work on the syntax as well, and report back.
Sorry for the bother.
~ Em

No problem at all!

Though I think you want to remove the rpm ondemand-gems for the given versions specifically not the directory. They’re managed through yum so if you’ve got another app, say some custom app that’s relying on them, yum will figure out the dependencies and if you’re able to remove them.

Thanks again, Jeff – Be well!

I’ll take the following as a partial win:

pinned apps tomorrow

Good deal!

Although, setting announcements like use case may already be a feature!

https://osc.github.io/ood-documentation/latest/customization.html#announcements