Skip to content

Install LTTng and related packages on Linux#690

Merged
clalancette merged 5 commits intoros2:masterfrom
christophebedard:christophebedard/install-lttng-on-linux
Apr 3, 2023
Merged

Install LTTng and related packages on Linux#690
clalancette merged 5 commits intoros2:masterfrom
christophebedard:christophebedard/install-lttng-on-linux

Conversation

@christophebedard
Copy link
Copy Markdown
Member

Part of ros2/ros2#1177

See ros2/ros2_tracing#31

Signed-off-by: Christophe Bedard christophe.bedard@apex.ai

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
@christophebedard christophebedard force-pushed the christophebedard/install-lttng-on-linux branch from 6077844 to d721c3c Compare March 24, 2023 00:39
@christophebedard christophebedard marked this pull request as ready for review March 24, 2023 00:39
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
python3-importlib-metadata \
$(if test ${EL_RELEASE} = 8; then echo python3-importlib-resources; fi) \
python3-lark-parser \
$(if test ${EL_RELEASE} != 8; then echo python3-lttng; fi) \
Copy link
Copy Markdown
Member Author

@christophebedard christophebedard Mar 24, 2023

Choose a reason for hiding this comment

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

I think lttng-ust should work, but I'm not completely sure about python3-lttng.

However, looking at this, I think it should work: https://github.com/ros/rosdistro/blob/bbf74994da40a4905b25bd27fab44b22c5ec9b2c/rosdep/python.yaml#L7651

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

RHEL 8 has python3-lttng, but the problem is that it's too old and tracetools breaks if it's present. I removed it in #657. Until tracetools handles the old version gracefully (which I'd still very much like to see), this is the best workaround.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Old versions can definitely be handled better, but this only installs python3-lttng on RHEL 9.

Copy link
Copy Markdown
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

If we keep our view focused to Rolling, then these changes look good to me.

However, these Dockerfiles are also used for Humble (Ubuntu 22.04/RHEL-8) and Foxy (Ubuntu 20.04/RHEL-8). In both cases, we'll be adding packages that weren't there before. What is ros2_tracing going to do in those circumstances? I don't want to enable it in the stable distributions (particularly Foxy), for fear it might break something.

@christophebedard
Copy link
Copy Markdown
Member Author

However, these Dockerfiles are also used for Humble (Ubuntu 22.04/RHEL-8) and Foxy (Ubuntu 20.04/RHEL-8). In both cases, we'll be adding packages that weren't there before. What is ros2_tracing going to do in those circumstances? I don't want to enable it in the stable distributions (particularly Foxy), for fear it might break something.

Oh, I missed that. That's indeed not great, because then tracetools would find LTTng and would include the tracepoints: https://github.com/ros2/ros2_tracing/blob/foxy/tracetools/CMakeLists.txt#L27.

I can do ${UBUNTU_DISTRO} = jammy and ${ROS_DISTRO} != humble for Ubuntu and ${EL_RELEASE} != 8 for RHEL for all these new packages.

@clalancette
Copy link
Copy Markdown
Contributor

I can do ${UBUNTU_DISTRO} = jammy and ${ROS_DISTRO} != humble for Ubuntu and ${EL_RELEASE} != 8 for RHEL for all these new packages.

Yeah, that is probably a good idea. I'll also suggest putting this in a separate block in the Ubuntu Dockerfile, similar to

RUN if test \( ${PLATFORM} = x86 -a ${INSTALL_CONNEXT_DEBS} = true -a ${UBUNTU_DISTRO} != jammy \); then apt-get update && RTI_NC_LICENSE_ACCEPTED=yes apt-get install -y rti-connext-dds-5.3.1; fi

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
@christophebedard
Copy link
Copy Markdown
Member Author

I'll also suggest putting this in a separate block in the Ubuntu Dockerfile

Done!

Copy link
Copy Markdown
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

This looks good to me, though I'll want to see Linux CI for all of Foxy, Humble, and Rolling on both Ubuntu and RHEL. I'd also like to get one more approval from @cottsay .

@clalancette
Copy link
Copy Markdown
Contributor

This looks good to me, though I'll want to see Linux CI for all of Foxy, Humble, and Rolling on both Ubuntu and RHEL. I'd also like to get one more approval from @cottsay .

Oh, actually, I guess I need to run it, since we can only do tests on local branches (not forks). I'll wait to hear from Scott before kicking that off.

Copy link
Copy Markdown
Member

@cottsay cottsay left a comment

Choose a reason for hiding this comment

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

One quick change

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
Copy link
Copy Markdown
Member

@cottsay cottsay left a comment

Choose a reason for hiding this comment

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

Thanks!

@clalancette
Copy link
Copy Markdown
Contributor

clalancette commented Mar 29, 2023

OK, I've pushed an exact copy of this branch to the origin. Here are some CI runs with that in place:

Foxy:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • RHEL-8 Build Status

Humble:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • RHEL-8 Build Status

Rolling:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • RHEL-9 Build Status

@christophebedard
Copy link
Copy Markdown
Member Author

christophebedard commented Mar 29, 2023

I thought we didn't need lttng-tools (which provides the CLI), but I forgot that I added it as an <exec_depend> of tracetools and that we need it in tracetools_trace: https://github.com/ros2/ros2_tracing/blob/e664e5bbd28b42da6430623fc1bcf644d6b6a449/tracetools_trace/tracetools_trace/tools/lttng.py#L90-L94. I'll add it as an exec dependency of tracetools_trace in ros2/ros2_tracing#31 and add it here.

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
@christophebedard
Copy link
Copy Markdown
Member Author

I also noticed that there was no rosdep rule for lttng-tools for RHEL, so I added it: ros/rosdistro#36641

@clalancette
Copy link
Copy Markdown
Contributor

All right. I'm only going to run the latest change against Rolling again, given that it is protected under the same checks as the previous code.

@clalancette
Copy link
Copy Markdown
Contributor

Rolling:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • RHEL-9 Build Status

@christophebedard
Copy link
Copy Markdown
Member Author

The test failures on RHEL don't seem to be related, but I can't find the same failures in recent jobs.

@clalancette
Copy link
Copy Markdown
Contributor

The test failures on RHEL don't seem to be related, but I can't find the same failures in recent jobs.

That one is a flaky test; you can see a failure of it in https://ci.ros2.org/view/nightly/job/nightly_linux-rhel_repeated/1448/#showFailuresLink . I really don't think it is involved here at all.

So I think we are good with this change.

Once we merge this in, that means that we'll be building tracepoints in by default for Rolling in our nightly CI jobs and our nightly packaging (tarball) jobs. What needs to happen to have it enabled in the debians? Do we just need to do a release of ros2_tracing for that to happen?

@christophebedard
Copy link
Copy Markdown
Member Author

christophebedard commented Mar 29, 2023

Once we merge this in, that means that we'll be building tracepoints in by default for Rolling in our nightly CI jobs and our nightly packaging (tarball) jobs. What needs to happen to have it enabled in the debians? Do we just need to do a release of ros2_tracing for that to happen?

Specifically after merging ros2/ros2_tracing#31 (which I think we should merge right after this), yes! LTTng will be picked up as a dependency (otherwise the build will fail), and the tracepoints will be compiled in.

Well, that's what I think will happen, anyway. I can check the testing repo and validate once it's re-built.

@christophebedard
Copy link
Copy Markdown
Member Author

christophebedard commented Mar 29, 2023

Next step before merging would be to run CI using this branch and ros2/ros2_tracing#31. See ros2/ros2_tracing#31 (comment)

@clalancette
Copy link
Copy Markdown
Contributor

Next step before merging would be to run CI using this branch and ros2/ros2_tracing#31. See ros2/ros2_tracing#31 (comment)

Awesome, the jobs there look good.

So what is the next step here? Do you want to merge the ros2_tracing PR, then I can merge this one?

@christophebedard
Copy link
Copy Markdown
Member Author

So what is the next step here? Do you want to merge the ros2_tracing PR, then I can merge this one?

Since packages will now depend on LTTng, and since CI doesn't seem to run rosdep install (except for RHEL, it seems), we should merge this first. Then I'll merge ros2/ros2_tracing#31 right after.

@clalancette
Copy link
Copy Markdown
Contributor

Since packages will now depend on LTTng, and since CI doesn't seem to run rosdep install (except for RHEL, it seems), we should merge this first. Then I'll merge ros2/ros2_tracing#31 right after.

OK, got it.

So, the only thing is that I'm on PTO, not checking email, starting about now until Monday (April 3). Despite the fact that I think we've done sufficient testing here, I'm somewhat reluctant to merge something like this and disappear. So either we should have @cottsay merge it and keep an eye on it tomorrow, or I can do it first thing Monday morning when I'm back. @cottsay what do you think?

@christophebedard
Copy link
Copy Markdown
Member Author

Waiting until Monday as a precaution is fine with me.

@clalancette clalancette merged commit 9b463ba into ros2:master Apr 3, 2023
@christophebedard christophebedard deleted the christophebedard/install-lttng-on-linux branch April 3, 2023 15:10
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.

3 participants