Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wayland errata #139

Merged
merged 19 commits into from
Jun 4, 2024
Merged

Conversation

aerickson
Copy link
Member

@aerickson aerickson commented Apr 16, 2024

Aims to fix #138.

# ExecStartPre to `/bin/sleep 30`

cp /lib/systemd/system/gdm3.service /etc/systemd/system/gdm3.service
crudini --set /etc/systemd/system/gdm3.service Service ExecStartPre '/bin/sleep 30'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it 15 it looks like I used that value:

alissy@gecko-t-t-linux-2204-wayland-exp-aliss-dbc1lhxwqq66ty08ew5a-q:~$ grep sleep /etc/systemd/system/gdm3.service 
ExecStartPre=/bin/sleep 15
alissy@gecko-t-t-linux-2204-wayland-exp-aliss-dbc1lhxwqq66ty08ew5a-q:~$ 

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed.

# ExecStartPre to `/bin/sleep 30`

cp /lib/systemd/system/gdm3.service /etc/systemd/system/gdm3.service
crudini --set /etc/systemd/system/gdm3.service Service ExecStartPre '/bin/sleep 30'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also the existing gdm3.service already has a value set so I dont know how crudini will deal with that:

alissy@gecko-t-t-linux-2204-wayland-exp-aliss-dbc1lhxwqq66ty08ew5a-q:~$ grep ExecStartPre /lib/systemd/system/gdm3.service 
ExecStartPre=/usr/share/gdm/generate-config
alissy@gecko-t-t-linux-2204-wayland-exp-aliss-dbc1lhxwqq66ty08ew5a-q:~$ 

Copy link
Member Author

@aerickson aerickson Apr 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just checked the output and it appears to be able to redefine it.

# ExecStartPre to `/bin/sleep 30`

cp /lib/systemd/system/gdm3.service /etc/systemd/system/gdm3.service
crudini --set /etc/systemd/system/gdm3.service Service ExecStartPre '/bin/sleep 30'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(also we should make it clear this is a hack, there are better ways to do that but I need to verify it actually works)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment added.



#
# TODO: generate mutter's monitors.xml (only if needed)
Copy link

@lissyx lissyx Apr 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's needed, I just dont know exactly what we need to set for some values (connector, vendor, product, serial), e.g., mine on my laptop:

alex@portable-alex:~$ cat ~/.config/monitors.xml
<monitors version="2">
  <configuration>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <scale>1</scale>
      <primary>yes</primary>
      <monitor>
        <monitorspec>
          <connector>eDP-1</connector>
          <vendor>CSO</vendor>
          <product>0x1407</product>
          <serial>0x00000000</serial>
        </monitorspec>
        <mode>
          <width>3840</width>
          <height>2160</height>
          <rate>60.000</rate>
        </mode>
      </monitor>
    </logicalmonitor>
  </configuration>
</monitors>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just create one by hand and hope that the connector doesn't matter? How should we proceed?

Copy link

@lissyx lissyx Apr 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see below: #139 (comment)

@aerickson
Copy link
Member Author

aerickson commented Apr 16, 2024

Building the following at 4dd8748.

monopacker build gw_fxci_gcp_l1_gui --secrets_file real_secrets_l1.yaml --packer-args '-on-error=ask' produced gw-fxci-gcp-l1-gui-googlecompute-2024-04-16t19-58-50z.

@aerickson
Copy link
Member Author

Building the following at 6ceed81.

monopacker build gw_fxci_gcp_l1_gui --secrets_file real_secrets_l1.yaml --packer-args '-on-error=ask' produced gw-fxci-gcp-l1-gui-googlecompute-2024-04-16t21-08-44z.

@@ -105,5 +105,7 @@ apt install -y ubuntu-restricted-extras wl-clipboard


#
# TODO: generate mutter's monitors.xml (only if needed)
# TODO: generate mutter's monitors.xml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So from https://firefox-ci-tc.services.mozilla.com/tasks/P-s9ONuKSSWIGcgPge-lJQ/runs/0/logs/public/logs/live_backing.log#L44 we can rely on that it seems:

$ cat /etc/xdg/monitors.xml 
<monitors version="2">
  <configuration>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <scale>1</scale>
      <primary>yes</primary>
      <monitor>
        <monitorspec>
          <connector>Virtual-1</connector>
          <vendor>unknown</vendor>
          <product>unknown</product>
          <serial>unknown</serial>
        </monitorspec>
        <mode>
          <width>1920</width>
          <height>1080</height>
          <rate>60.000</rate>
        </mode>
      </monitor>
    </logicalmonitor>
  </configuration>
</monitors>

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.


# NOTES: this is a hack. alissy is working on a better solution.

cp /lib/systemd/system/gdm3.service /etc/systemd/system/gdm3.service
Copy link

@lissyx lissyx Apr 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delay gdm-service:

$ cat /etc/systemd/system/gdm.service.d/gdm-wait.conf 
[Unit]
Description=Extra 30s wait

[Service]
ExecStartPre=/bin/sleep 30


# NOTES: this is a hack. alissy is working on a better solution.

cp /lib/systemd/system/gdm3.service /etc/systemd/system/gdm3.service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old hack removed and new gdm wait service added.

@aerickson
Copy link
Member Author

Building the following at 2357dbc.

monopacker build gw_fxci_gcp_l1_gui --secrets_file real_secrets_l1.yaml --packer-args '-on-error=ask' produced gw-fxci-gcp-l1-gui-googlecompute-2024-04-17t21-57-05z.



#
# gdm wait service file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to explain that this is a hack required because without, on those workers, we end up in a situation where the wayland seat is in a weird state and consequences are:

  • either x11 session
  • either xwayland fallback
  • either wayland but with missing keyboard capability that breaks things including copy/paste

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I was unclear about why it was needed. Comment added.

@aerickson
Copy link
Member Author

Alissy, are we happy with the current state of this PR/the image? Thanks!

@lissyx
Copy link

lissyx commented Apr 26, 2024

Alissy, are we happy with the current state of this PR/the image? Thanks!

I would need to run a few more tries to have a look, but it seems to be working good enough in my case. Whether it is OK for the whole m-c I can't tell, and assuming we dont have other changes (XDG_RUNTIME_DIR for example), I'd say I am happy.

@lissyx
Copy link

lissyx commented Apr 30, 2024

I am not sure what is the state of the current workers, but this is not complete (missing XDG_RUNTIME_DIR fixes?): https://treeherder.mozilla.org/jobs?repo=try&revision=3edc07891c47225f1b0af712c901c9604d717528

@aerickson
Copy link
Member Author

Building the following at ca43828.

monopacker build gw_fxci_gcp_l1_gui --secrets_file real_secrets_l1.yaml --packer-args '-on-error=ask' produced gw-fxci-gcp-l1-gui-googlecompute-2024-05-15t21-40-31z.

@lissyx
Copy link

lissyx commented May 17, 2024

Building the following at ca43828.

monopacker build gw_fxci_gcp_l1_gui --secrets_file real_secrets_l1.yaml --packer-args '-on-error=ask' produced gw-fxci-gcp-l1-gui-googlecompute-2024-05-15t21-40-31z.

latest batch of retries from this morning: https://treeherder.mozilla.org/jobs?repo=try&revision=139d8f8ed0b12bcff0460370916e1b11d0a77683

they all came green, the orange was when the push to try was done and it was still running generic-worker 64.2.0, as verifiable in the logs

Copy link

@lissyx lissyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to have something that checks if generic-worker installed does properly sets XDG_RUNTIME_DIR to prevent regressions, but I dont know where/how. Otherwise, retries after the deployment are green so it looks good enough to me

echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections

# install stuff
apt install -y ubuntu-restricted-extras wl-clipboard
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debugging is done we dont need wl-clipboard anymore. Of course you might want to keep it if useful but I dont think we should.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wl-clipboard removed. Check for XDG_RUNTIME_DIR added.

@aerickson
Copy link
Member Author

Building the following at 14a0da9.

monopacker build gw_fxci_gcp_l1_gui --secrets_file real_secrets_l1.yaml --packer-args '-on-error=ask' produced gw-fxci-gcp-l1-gui-googlecompute-2024-05-31t15-18-14z.

@aerickson aerickson requested a review from rcurranmoz June 4, 2024 19:18
@aerickson
Copy link
Member Author

Alissy is happy with the state of this I believe. We've shipped the latest revision to the main wayland image alias.

I think we're ready for a review and to merge this.

@aerickson aerickson merged commit 8af8f82 into mozilla-platform-ops:main Jun 4, 2024
2 checks passed
@aerickson aerickson deleted the wayland_errata branch June 4, 2024 19:26
ahal pushed a commit to ahal/fxci-config that referenced this pull request Jun 27, 2024
ahal pushed a commit to ahal/fxci-config that referenced this pull request Jun 27, 2024
ahal pushed a commit to ahal/fxci-config that referenced this pull request Jun 27, 2024
…glecompute-2024-05-31t15-18-14z r=relsre-reviewers,rcurran

Promote the `monopacker-ubuntu-2204-wayland-aerickson-testing` image to `monopacker-ubuntu-2204-wayland`.

Specifically set the `monopacker-ubuntu-2204-wayland` image alias to use `gw-fxci-gcp-l1-gui-googlecompute-2024-05-31t15-18-14z`.

Alissy is happy with the tweaks PR (mozilla-platform-ops/monopacker#139) so let's release this to general availability.

Differential Revision: https://phabricator.services.mozilla.com/D212585
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.

wayland image fixes
3 participants