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

Expose limits imposed by cgroups via port library APIs #1281

Open
4 of 6 tasks
ashu-mehra opened this issue Jun 21, 2017 · 26 comments
Open
4 of 6 tasks

Expose limits imposed by cgroups via port library APIs #1281

ashu-mehra opened this issue Jun 21, 2017 · 26 comments
Assignees

Comments

@ashu-mehra
Copy link
Contributor

ashu-mehra commented Jun 21, 2017

Runtimes like JVM rely on resource limits like memory and cpus to adjust their internal parameters which includes heap size, GC helper threads, JIT helper threads etc.
Cgroups in Linux provide a mechanism to impose limits on such resources. Therefore, when running as part of a cgroup, the runtime should adjust its internal parameters based on the resource constraints imposed by the cgroup.
Currently the information about resource constraints imposed by cgroup is not provided by the port library in any way. If a runtime wants to take into consideration the limits imposed by the cgroup, it would have to figure this out on its own.
It would be useful for the runtimes if port library can provide APIs that would enable them to query the resource constraints imposed by the cgroup.
The proposal is to add mechanism for following tasks:

  1. Add capability to read /proc/<pid>/cgroup file.
    Using this file, the process can figure out the cgroup it belongs to for a given subsystem.
  2. Expose APIs for providing memory limits and CPU limits imposed by the cgroup. For start only these two limits would be exposed. More can be added later as and when required.
  3. Now, the above mechanism would work when running on bare metal or a VM, but would break when running in a docker container. This is because in a docker container the /proc/<pid>/cgroup gives the cgroup of the process on the host, and not the one in the container. AFAIK when running in container, the cgroup would always be the root cgroup. Therefore, we also need to detect whether the process is running in a docker container or not, and use correct cgroup to get the resource limits.

As an example, if I log in to a docker container, and cat /proc/1/cgroup, I get following contents:

$ docker exec -it dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612 /bin/bash
root@dfee854963d4:/# cat /proc/1/cgroup
11:pids:/docker/dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612
10:perf_event:/docker/dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612
9:freezer:/docker/dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612
8:cpuset:/docker/dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612
7:blkio:/docker/dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612
6:memory:/docker/dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612
5:hugetlb:/docker/dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612
4:devices:/docker/dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612
3:net_prio,net_cls:/docker/dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612
2:cpuacct,cpu:/docker/dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612
1:name=systemd:/docker/dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612

which shows the process is part of /docker/dfee854963d4575d263785ddee0f3c398355b354e6608c5777a3a2e40fef3612 cgroup in memory subsystem. However, if I go to /sys/fs/cgroup/memory I don't see any such cgroup, but the same cgroup is present in the host. Probably the /sys/fs/cgroup/memory/docker/<id> cgroup on the host is mapped as the root cgroup inside the container.
In short, /proc/<pid>/cgroup cannot be used for getting the cgroup when running in a docker container.

Breaking down this work into following lists of tasks:

  • Add support for reading files for detecting resource limits for cgroup v1
  • Determine if the we are running in container or not
  • Add port library API for exposing memory limit imposed by cgroup
  • Add port library API for exposing cpu limit imposed by cgroup
  • Detect if the system is using cgroup v1 or cgroup v2
  • Add support for reading files for detecting resource limits for cgroup v2
@ashu-mehra
Copy link
Contributor Author

fyi @charliegracie @DanHeidinga

ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jun 27, 2017
Added code for reading /proc/<pid>/cgroup file which provides
information about the cgroups that the process belongs to.
This information can be used to get resource constraints imposed
by the cgroup by reading appropriate file(s) under
/sys/fs/cgroup/<subsystem>/<cgroup name>.
Based on this mechanism, a port library API
omrsysinfo_get_cgroup_memlimit() has been added which returns
the memory limit imposed by the cgroup by reading the contents of
/sys/fs/cgroup/<subsystem>/<cgroup name>/memory.limit_in_bytes file.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jun 27, 2017
Added code for reading /proc/<pid>/cgroup file which provides
information about the cgroups that the process belongs to.
This information can be used to get resource constraints imposed
by the cgroup by reading appropriate file(s) under
/sys/fs/cgroup/<subsystem>/<cgroup name>.
Based on this mechanism, a port library API
omrsysinfo_get_cgroup_memlimit() has been added which returns
the memory limit imposed by the cgroup by reading the contents of
/sys/fs/cgroup/<subsystem>/<cgroup name>/memory.limit_in_bytes file.

There is more work required to fully support cgroups, which includes
determine if we are in container or not,
adding APIs to expose other resource limits,
adding support for cgroup v2 etc.
These will be done in subsequent commits.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jun 28, 2017
Added code for reading /proc/<pid>/cgroup file which provides
information about the cgroups that the process belongs to.
This information can be used to get resource constraints imposed
by the cgroup by reading appropriate file(s) under
/sys/fs/cgroup/<subsystem>/<cgroup name>.
Based on this mechanism, a port library API
omrsysinfo_get_cgroup_memlimit() has been added which returns
the memory limit imposed by the cgroup by reading the contents of
/sys/fs/cgroup/<subsystem>/<cgroup name>/memory.limit_in_bytes file.

There is more work required to fully support cgroups, which includes
determine if we are in container or not,
adding APIs to expose other resource limits,
adding support for cgroup v2 etc.
These will be done in subsequent commits.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jun 28, 2017
Added code for reading /proc/<pid>/cgroup file which provides
information about the cgroups that the process belongs to.
This information can be used to get resource constraints imposed
by the cgroup by reading appropriate file(s) under
/sys/fs/cgroup/<subsystem>/<cgroup name>.
Based on this mechanism, a port library API
omrsysinfo_get_cgroup_memlimit() has been added which returns
the memory limit imposed by the cgroup by reading the contents of
/sys/fs/cgroup/<subsystem>/<cgroup name>/memory.limit_in_bytes file.

There is more work required to fully support cgroups, which includes
determine if we are in container or not,
adding APIs to expose other resource limits,
adding support for cgroup v2 etc.
These will be done in subsequent commits.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
@DanHeidinga
Copy link
Contributor

Thanks @ashu-mehra for starting on this - it's an important feature and definitely needed in OMR!

The API for this should make it easy to make existing code cgroup-aware without having to explicitly code a cgroup vs non-cgroup path in all code requesting i.e. sys max memory.

A very rough sketch of what I'm thinking would be:

/* Determine if running in a cgroup namespace */
BOOLEAN omr_sysinfo_cgroup_in_cgroup()

/* Indicate to port library that limits should be taken from the cgroup, not from the machine.
 * @return previous value of this setting
 */
BOOLEAN omr_sysinfo_cgroup_enable_cgroup_limits()

/* Should the port library respect cgroups in its normal API calls */
BOOLEAN omr_sysinfo_cgroup_limits_enabled()

/* Special accessors to get the cgroup-related limit for YYYY.
 * ie: long omr_sysinfo_cgroup_get_max_memory
 */
XXXX omr_sysinfo_cgroup_get_max_YYYYY()

And existing apis would be updated to be cgroup aware:

XXXX omr_sysinfo_get_max_memory() {
   if (omr_sysinfo_cgroup_limits_enabled()) {
      return omr_sysinfo_get_max_memory();
   } else {
      ....
      /* existing code path */
      .....
   }

This makes it easy for all consuming code to be aware of cgroup limits without having to be modified. Does this seem like a reasonable (though very rough) api sketch?

@ashu-mehra
Copy link
Contributor Author

ashu-mehra commented Jun 30, 2017

@DanHeidinga Thanks for jotting down the structure. I have exactly similar usage pattern in mind and I agree existing APIs should be updated to use cgroups when available.

Couple of points:

  1. Do we need to make omr_sysinfo_cgroup_limits_enabled() an API, or just an internal helper function?
  2. Same for omr_sysinfo_cgroup_in_cgroup(). It is checking if we are in cgroup or not, which would be needed internally by omr_sysinfo_cgroup_enable_cgroup_limits(). So would it be better to just have it as helper function?

@DanHeidinga
Copy link
Contributor

Do we need to make omr_sysinfo_cgroup_limits_enabled() an API, or just an internal helper function?

My gut says to make it an API so that reporting / monitoring tools such as a javacore file can report which mode the port library has been put in.

Same for omr_sysinfo_cgroup_in_cgroup().

For the same kinds of reasons, we want this to be query-able by the runtime using the port library.

And to be clear, I'm not sold on the method names proposed in the rough sketch. If you think of something better, go with it - these were off the cuff examples.

ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jul 3, 2017
Added code for reading /proc/<pid>/cgroup file which provides
information about the cgroups that the process belongs to.
This information can be used to get resource constraints imposed
by the cgroup by reading appropriate file(s) under
/sys/fs/cgroup/<subsystem>/<cgroup name>.

Added following APIs to the port library to interact with cgroups:
1. omrsysinfo_is_cgroup_limits_supported()
2. omrsysinfo_is_cgroup_limits_enabled()
3. omrsysinfo_enable_cgroup_limits()
4. omrsysinfo_cgroup_get_memlimit()

omrsysinfo_cgroup_get_memlimit() returns the memory limit imposed
by the cgroup by reading the contents of
/sys/fs/cgroup/memory/cgroup name>/memory.limit_in_bytes file.

There is more work required to fully support cgroups, which includes
determine if we are in container or not,
adding APIs to expose other resource limits,
adding support for cgroup v2 etc.
These will be done in subsequent commits.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jul 3, 2017
Added code for reading /proc/<pid>/cgroup file which provides
information about the cgroups that the process belongs to.
This information can be used to get resource constraints imposed
by the cgroup by reading appropriate file(s) under
/sys/fs/cgroup/<subsystem>/<cgroup name>.

Added following APIs to the port library to interact with cgroups:
1. omrsysinfo_is_cgroup_limits_supported()
2. omrsysinfo_is_cgroup_limits_enabled()
3. omrsysinfo_enable_cgroup_limits()
4. omrsysinfo_cgroup_get_memlimit()

omrsysinfo_cgroup_get_memlimit() returns the memory limit imposed
by the cgroup by reading the contents of
/sys/fs/cgroup/memory/cgroup name>/memory.limit_in_bytes file.

There is more work required to fully support cgroups, which includes
determine if we are in container or not,
adding APIs to expose other resource limits,
adding support for cgroup v2 etc.
These will be done in subsequent commits.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
@ashu-mehra
Copy link
Contributor Author

As there are quite a few things to be done to fully support cgroups, I have tried to break it down into smaller items and created a task list in the first comment.
I will try to create pull requests targeting these tasks in the list.

If I have missed anything, feel free to add tasks in the list in the first comment.

ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jul 5, 2017
Added code for reading /proc/<pid>/cgroup file which provides
information about the cgroups that the process belongs to.
This information can be used to get resource constraints imposed
by the cgroup by reading appropriate file(s) under
/sys/fs/cgroup/<subsystem>/<cgroup name>.

Added following APIs to the port library to interact with cgroups:
1. omrsysinfo_is_cgroup_limits_supported()
2. omrsysinfo_is_cgroup_limits_enabled()
3. omrsysinfo_enable_cgroup_limits()
4. omrsysinfo_cgroup_get_memlimit()

omrsysinfo_cgroup_get_memlimit() returns the memory limit imposed
by the cgroup by reading the contents of
/sys/fs/cgroup/memory/cgroup name>/memory.limit_in_bytes file.

There is more work required to fully support cgroups, which includes
determine if we are in container or not,
adding APIs to expose other resource limits,
adding support for cgroup v2 etc.
These will be done in subsequent commits.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jul 5, 2017
Added code for reading /proc/<pid>/cgroup file which provides
information about the cgroups that the process belongs to.
This information can be used to get resource constraints imposed
by the cgroup by reading appropriate file(s) under
/sys/fs/cgroup/<subsystem>/<cgroup name>.

Added following APIs to the port library to interact with cgroups:
1. omrsysinfo_is_cgroup_limits_supported()
2. omrsysinfo_is_cgroup_limits_enabled()
3. omrsysinfo_enable_cgroup_limits()
4. omrsysinfo_cgroup_get_memlimit()

omrsysinfo_cgroup_get_memlimit() returns the memory limit imposed
by the cgroup by reading the contents of
/sys/fs/cgroup/memory/cgroup name>/memory.limit_in_bytes file.

There is more work required to fully support cgroups, which includes
determine if we are in container or not,
adding APIs to expose other resource limits,
adding support for cgroup v2 etc.
These will be done in subsequent commits.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jul 6, 2017
Added code for reading /proc/<pid>/cgroup file which provides
information about the cgroups that the process belongs to.
This information can be used to get resource constraints imposed
by the cgroup by reading appropriate file(s) under
/sys/fs/cgroup/<subsystem>/<cgroup name>.

Added following APIs to the port library to interact with cgroups:
1. omrsysinfo_is_cgroup_limits_supported()
2. omrsysinfo_is_cgroup_limits_enabled()
3. omrsysinfo_enable_cgroup_limits()
4. omrsysinfo_cgroup_get_memlimit()

omrsysinfo_cgroup_get_memlimit() returns the memory limit imposed
by the cgroup by reading the contents of
/sys/fs/cgroup/memory/cgroup name>/memory.limit_in_bytes file.

There is more work required to fully support cgroups, which includes
determine if we are in container or not,
adding APIs to expose other resource limits,
adding support for cgroup v2 etc.
These will be done in subsequent commits.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
@ashu-mehra
Copy link
Contributor Author

ashu-mehra commented Jul 11, 2017

@DanHeidinga @charliegracie @dinogun

For the task of determining if we are running inside a container or not, I have following thoughts:

Since there are multiple container types, not just Docker (Rkt is another going around), having a port library API omrsysinfo_get_container_type() would be relevant.
Detecting container type is not straight forward and not well documented. We would have to use all sorts of mechanisms to figure that out.
We can propose to set an env variable "CONTAINER_TYPE" to be set by the user which would indicate the container in which the runtime is running.
For Docker, mechanism described in this stackeoverflow thread can be used:
The most reliable way is to check /proc/1/cgroup. It will tell you the control groups of the init process, and when you are not in a container, that will be / for all hierarchies. When you are inside a container, you will see the name of the anchor point; which, with LXC/Docker containers, will be something like /lxc/<containerid> or /docker/<containerid> respectively.

Based on above thoughts I have following code structure. Let me know if this makes sense.

enum ContainerType {
	DOCKER,
	RKT,
        ...,
	UNSUPPORTED,
	NONE
}
ContainerType omrsysinfo_get_container_type()

omrsysinfo_get_container_type() {
	type = getenv("CONTAINER_TYPE");
	if (NULL != type) {
		if (type == "docker" )
			return DOCKER;
		else if (type == "rkt")
			return RKT;
		else 
			return UNSUPPORTED;
	} else {
		if (isDockerContainer()) {
			return DOCKER;
		} else if (isRktContainer()) {
			return RKT;
		} else {
			return NONE;
		}
	}
}

isDockerContainer() {
	cgroup = getCgroupForPID(1)
	if (cgroup == "/") {
		return FALSE;
	} else if (cgroup.contains("docker")) {
		return TRUE;
	}
}

isRktContainer() {
      ...
}

@dinogun
Copy link

dinogun commented Jul 11, 2017

+1.
This is as per the discussion that we had earlier today and makes sense to me. This is also how we have designed the isVirtual API as well.

ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jul 14, 2017
Error handling in porlibrary APIs related to cgroups
can suffer from possible truncation issues. To handle these issues,
a new portlibrary API omrerror_set_last_error_with_message_format()
is added which accepts error message in form of format string
and variable number of arguments.
Portlibrary APIs related to cgroups is updated to use
omrerror_set_last_error_with_message_format()
for setting error messages.

Issue eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jul 14, 2017
Error handling in porlibrary APIs related to cgroups
can suffer from possible truncation issues. To handle these issues,
a new portlibrary API omrerror_set_last_error_with_message_format()
is added which accepts error message in form of format string
and variable number of arguments.
Portlibrary APIs related to cgroups is updated to use
omrerror_set_last_error_with_message_format()
for setting error messages.

Issue eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jul 17, 2017
Error handling in porlibrary APIs related to cgroups
can suffer from possible truncation issues. To handle these issues,
a new portlibrary API omrerror_set_last_error_with_message_format()
is added which accepts error message in form of format string
and variable number of arguments.
Portlibrary APIs related to cgroups is updated to use
omrerror_set_last_error_with_message_format()
for setting error messages.

Issue eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jul 26, 2017
Instead of providing APIs that enable cgroup limits for all
subsystems, a new set of APIs is added which allows to query
which subsystems are available and enable subsystems individually.
This would allow runtimes to enable cgroup subsystems based on their
requirements.
Note that there is another subtle change in the design of the
port library APIs related to cgroup system.
Enabling a cgroup subsystem in portlibrary (by calling
omrsysinfo_cgroup_enable_subsystems) would make the port library APIs
to use cgroup limits internally.
Any port library API that directly returns cgroup limits,
eg omrsysinfo_cgroup_get_memlimit(), does not check whether the
corresponding subsystem (eg memory) is enabled or not.
Therefore, when using omrsysinfo_cgroup_* APIs,
the caller doesn't need to explicitly enable the corresponding
subsystem in the port library.

Consider the case of omrsysinfo_get_physical_memory() which returns
physical memory of the system.
If the system is running in a cgroup, and the cgroup's "memory"
subsystem is enabled, then omrsysinfo_get_physical_memory()
would internally call omrsysinfo_cgroup_get_memlimit(), and
return memory limit imposed by the cgroup.
However, if the user wants to just get the memory limit imposed by the
cgroup, it can directly call omrsysinfo_cgroup_get_memlimit().

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Jul 26, 2017
Instead of providing APIs that enable cgroup limits for all
subsystems, a new set of APIs is added which allows to query
which subsystems are available and enable subsystems individually.
This would allow runtimes to enable cgroup subsystems based on their
requirements.
Note that there is another subtle change in the design of the
port library APIs related to cgroup system.
Enabling a cgroup subsystem in portlibrary (by calling
omrsysinfo_cgroup_enable_subsystems) would make the port library APIs
to use cgroup limits internally.
Any port library API that directly returns cgroup limits,
eg omrsysinfo_cgroup_get_memlimit(), does not check whether the
corresponding subsystem (eg memory) is enabled or not.
Therefore, when using omrsysinfo_cgroup_* APIs,
the caller doesn't need to explicitly enable the corresponding
subsystem in the port library.

Consider the case of omrsysinfo_get_physical_memory() which returns
physical memory of the system.
If the system is running in a cgroup, and the cgroup's "memory"
subsystem is enabled, then omrsysinfo_get_physical_memory()
would internally call omrsysinfo_cgroup_get_memlimit(), and
return memory limit imposed by the cgroup.
However, if the user wants to just get the memory limit imposed by the
cgroup, it can directly call omrsysinfo_cgroup_get_memlimit(),
without enabling the "memory" subsystem.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Aug 10, 2017
Instead of providing APIs that enable cgroup limits for all
subsystems, a new set of APIs is added which allows to query
which subsystems are available and enable subsystems individually.
This would allow runtimes to enable cgroup subsystems based on their
requirements.
Note that there is another subtle change in the design of the
port library APIs related to cgroup system.
Enabling a cgroup subsystem in portlibrary (by calling
omrsysinfo_cgroup_enable_subsystems) would make the port library APIs
to use cgroup limits internally.
Any port library API that directly returns cgroup limits,
eg omrsysinfo_cgroup_get_memlimit(), does not check whether the
corresponding subsystem (eg memory) is enabled or not.
Therefore, when using omrsysinfo_cgroup_* APIs,
the caller doesn't need to explicitly enable the corresponding
subsystem in the port library.

Consider the case of omrsysinfo_get_physical_memory() which returns
physical memory of the system.
If the system is running in a cgroup, and the cgroup's "memory"
subsystem is enabled, then omrsysinfo_get_physical_memory()
would internally call omrsysinfo_cgroup_get_memlimit(), and
return memory limit imposed by the cgroup.
However, if the user wants to just get the memory limit imposed by the
cgroup, it can directly call omrsysinfo_cgroup_get_memlimit(),
without enabling the "memory" subsystem.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Aug 13, 2017
Instead of providing APIs that enable cgroup limits for all
subsystems, a new set of APIs is added which allows to query
which subsystems are available and enable subsystems individually.
This would allow runtimes to enable cgroup subsystems based on their
requirements.
Note that there is another subtle change in the design of the
port library APIs related to cgroup system.
Enabling a cgroup subsystem in portlibrary (by calling
omrsysinfo_cgroup_enable_subsystems) would make the port library APIs
to use cgroup limits internally.
Any port library API that directly returns cgroup limits,
eg omrsysinfo_cgroup_get_memlimit(), does not check whether the
corresponding subsystem (eg memory) is enabled or not.
Therefore, when using omrsysinfo_cgroup_* APIs,
the caller doesn't need to explicitly enable the corresponding
subsystem in the port library.

Consider the case of omrsysinfo_get_physical_memory() which returns
physical memory of the system.
If the system is running in a cgroup, and the cgroup's "memory"
subsystem is enabled, then omrsysinfo_get_physical_memory()
would internally call omrsysinfo_cgroup_get_memlimit(), and
return memory limit imposed by the cgroup.
However, if the user wants to just get the memory limit imposed by the
cgroup, it can directly call omrsysinfo_cgroup_get_memlimit(),
without enabling the "memory" subsystem.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Aug 14, 2017
Instead of providing APIs that enable cgroup limits for all
subsystems, a new set of APIs is added which allows to query
which subsystems are available and enable subsystems individually.
This would allow runtimes to enable cgroup subsystems based on their
requirements.
Note that there is another subtle change in the design of the
port library APIs related to cgroup system.
Enabling a cgroup subsystem in portlibrary (by calling
omrsysinfo_cgroup_enable_subsystems) would make the port library APIs
to use cgroup limits internally.
Any port library API that directly returns cgroup limits,
eg omrsysinfo_cgroup_get_memlimit(), does not check whether the
corresponding subsystem (eg memory) is enabled or not.
Therefore, when using omrsysinfo_cgroup_* APIs,
the caller doesn't need to explicitly enable the corresponding
subsystem in the port library.

Consider the case of omrsysinfo_get_physical_memory() which returns
physical memory of the system.
If the system is running in a cgroup, and the cgroup's "memory"
subsystem is enabled, then omrsysinfo_get_physical_memory()
would internally call omrsysinfo_cgroup_get_memlimit(), and
return memory limit imposed by the cgroup.
However, if the user wants to just get the memory limit imposed by the
cgroup, it can directly call omrsysinfo_cgroup_get_memlimit(),
without enabling the "memory" subsystem.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Aug 29, 2017
Instead of providing APIs that enable cgroup limits for all
subsystems, a new set of APIs is added which allows to query
which subsystems are available and enable subsystems individually.
This would allow runtimes to enable cgroup subsystems based on their
requirements.
Note that there is another subtle change in the design of the
port library APIs related to cgroup system.
Enabling a cgroup subsystem in portlibrary (by calling
omrsysinfo_cgroup_enable_subsystems) would make the port library APIs
to use cgroup limits internally.
Any port library API that directly returns cgroup limits,
eg omrsysinfo_cgroup_get_memlimit(), does not check whether the
corresponding subsystem (eg memory) is enabled or not.
Therefore, when using omrsysinfo_cgroup_* APIs,
the caller doesn't need to explicitly enable the corresponding
subsystem in the port library.

Consider the case of omrsysinfo_get_physical_memory() which returns
physical memory of the system.
If the system is running in a cgroup, and the cgroup's "memory"
subsystem is enabled, then omrsysinfo_get_physical_memory()
would internally call omrsysinfo_cgroup_get_memlimit(), and
return memory limit imposed by the cgroup.
However, if the user wants to just get the memory limit imposed by the
cgroup, it can directly call omrsysinfo_cgroup_get_memlimit(),
without enabling the "memory" subsystem.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Sep 11, 2017
Instead of providing APIs that enable cgroup limits for all
subsystems, a new set of APIs is added which allows to query
which subsystems are available and enable subsystems individually.
This would allow runtimes to enable cgroup subsystems based on their
requirements.
Note that there is another subtle change in the design of the
port library APIs related to cgroup system.
Enabling a cgroup subsystem in portlibrary (by calling
omrsysinfo_cgroup_enable_subsystems) would make the port library APIs
to use cgroup limits internally.
Any port library API that directly returns cgroup limits,
eg omrsysinfo_cgroup_get_memlimit(), does not check whether the
corresponding subsystem (eg memory) is enabled or not.
Therefore, when using omrsysinfo_cgroup_* APIs,
the caller doesn't need to explicitly enable the corresponding
subsystem in the port library.

Consider the case of omrsysinfo_get_physical_memory() which returns
physical memory of the system.
If the system is running in a cgroup, and the cgroup's "memory"
subsystem is enabled, then omrsysinfo_get_physical_memory()
would internally call omrsysinfo_cgroup_get_memlimit(), and
return memory limit imposed by the cgroup.
However, if the user wants to just get the memory limit imposed by the
cgroup, it can directly call omrsysinfo_cgroup_get_memlimit(),
without enabling the "memory" subsystem.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
ashu-mehra pushed a commit to ashu-mehra/omr that referenced this issue Sep 11, 2017
Instead of providing APIs that enable cgroup limits for all
subsystems, a new set of APIs is added which allows to query
which subsystems are available and enable subsystems individually.
This would allow runtimes to enable cgroup subsystems based on their
requirements.
Note that there is another subtle change in the design of the
port library APIs related to cgroup system.
Enabling a cgroup subsystem in portlibrary (by calling
omrsysinfo_cgroup_enable_subsystems) would make the port library APIs
to use cgroup limits internally.
Any port library API that directly returns cgroup limits,
eg omrsysinfo_cgroup_get_memlimit(), does not check whether the
corresponding subsystem (eg memory) is enabled or not.
Therefore, when using omrsysinfo_cgroup_* APIs,
the caller doesn't need to explicitly enable the corresponding
subsystem in the port library.

Consider the case of omrsysinfo_get_physical_memory() which returns
physical memory of the system.
If the system is running in a cgroup, and the cgroup's "memory"
subsystem is enabled, then omrsysinfo_get_physical_memory()
would internally call omrsysinfo_cgroup_get_memlimit(), and
return memory limit imposed by the cgroup.
However, if the user wants to just get the memory limit imposed by the
cgroup, it can directly call omrsysinfo_cgroup_get_memlimit(),
without enabling the "memory" subsystem.

Issue: eclipse-omr#1281
Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 14, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64<OPTIONS_B>
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 14, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64<OPTIONS_B>
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
EricYangIBM added a commit to EricYangIBM/omr that referenced this issue Jun 14, 2022
Add test for omrsysinfo_is_running_in_container and fix cgroup tests when
running in a cgroup v1 container.

Issue: eclipse-omr#1281
Signed-off-by: Eric Yang <eric.yang@ibm.com>
EricYangIBM added a commit to EricYangIBM/omr that referenced this issue Jun 14, 2022
Add test for omrsysinfo_is_running_in_container and fix cgroup tests when
running in a cgroup v1 container.

Issue: eclipse-omr#1281
Signed-off-by: Eric Yang <eric.yang@ibm.com>
EricYangIBM added a commit to EricYangIBM/omr that referenced this issue Jun 14, 2022
Add test for omrsysinfo_is_running_in_container and fix cgroup tests when
running in a cgroup v1 container.

Issue: eclipse-omr#1281
Signed-off-by: Eric Yang <eric.yang@ibm.com>
EricYangIBM added a commit to EricYangIBM/omr that referenced this issue Jun 14, 2022
Add testing for omrsysinfo_cgroup_subsystem_iterator_* functions; checks
a few key metrics and that iterating doesn't fail.

Issue: eclipse-omr#1281
Signed-off-by: Eric Yang <eric.yang@ibm.com>
EricYangIBM added a commit to EricYangIBM/omr that referenced this issue Jun 14, 2022
Add test for omrsysinfo_is_running_in_container and fix cgroup tests when
running in a cgroup v1 container.

Issue: eclipse-omr#1281
Signed-off-by: Eric Yang <eric.yang@ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 15, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64<OPTIONS_B>
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
EricYangIBM added a commit to EricYangIBM/omr that referenced this issue Jun 15, 2022
Add testing for omrsysinfo_cgroup_subsystem_iterator_* functions; checks
a few key metrics and that iterating doesn't fail.

Issue: eclipse-omr#1281
Signed-off-by: Eric Yang <eric.yang@ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 15, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64<OPTIONS_B>
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh pushed a commit to babsingh/omr that referenced this issue Jun 15, 2022
Add test for omrsysinfo_is_running_in_container and fix cgroup tests when
running in a cgroup v1 container.

Issue: eclipse-omr#1281
Signed-off-by: Eric Yang <eric.yang@ibm.com>
babsingh pushed a commit to babsingh/omr that referenced this issue Jun 15, 2022
Add testing for omrsysinfo_cgroup_subsystem_iterator_* functions; checks
a few key metrics and that iterating doesn't fail.

Issue: eclipse-omr#1281
Signed-off-by: Eric Yang <eric.yang@ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 15, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
EricYangIBM added a commit to EricYangIBM/omr that referenced this issue Jun 15, 2022
Add testing for omrsysinfo_cgroup_subsystem_iterator_* functions; checks
a few key metrics and that iterating doesn't fail.

Issue: eclipse-omr#1281
Signed-off-by: Eric Yang <eric.yang@ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 16, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 16, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 16, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 16, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 16, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 16, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 22, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 22, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 22, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) configure:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(configure:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 23, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) cmake:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(cmake:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jun 24, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) cmake:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(cmake:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Jul 14, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes inside a container.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
    c) linux_ppc-64_le_gcc PR builds will be run on cgroup.v2 nodes.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) cmake:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(cmake:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Aug 17, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes inside a container.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
    c) linux_ppc-64_le_gcc PR builds will be run on cgroup.v2 nodes.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) cmake:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(cmake:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Sep 21, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes inside a container.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
    c) linux_ppc-64_le_gcc PR builds will be run on cgroup.v2 nodes.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) cmake:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(cmake:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/omr that referenced this issue Sep 21, 2022
1.  Ubuntu 16 (Ub16) is out of service. Thus, Ub16 x86_64 Dockerfile has
    been removed.
2.  We can write a script to generate Dockerfiles to support different
    operating systems (OSs) and architectures. For the time being, only a
    Dockerfile for Ubuntu 20 x86_64 has been added. This Dockerfile
    can be used to derive a script to generate Dockerfiles for other
    OSs and architectures since it has all the fundamental components.
3.  OMR_RUNNING_IN_DOCKER=1 environment variable is set when the PR builds
    are run inside Docker. This will be used in tests to verify the
    behaviour port library sysinfo functions.
4.  PortStrTest.str_test4 is temporarily disabled since it fails in a
    container. Issue tracker: eclipse-omr#6566.
5.  Changes to the default behaviour:
    a) linux_x86 PR builds will be run on cgroup.v1 nodes inside a container.
    b) linux_x86-64 PR builds will be run on cgroup.v2 nodes inside a container.
    c) linux_ppc-64_le_gcc PR builds will be run on cgroup.v2 nodes.
6.  PR build changes:
    a) Existing PR build syntax should have no impact.
    b) All new features are additive.
    c) New features allow PR builds to be configurable.
7.  New command example: jenkins build xlinux(OPTION1,OPTION2,...)
8.  The following options are added:
    a) cgroupv1 -> add label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(cgroupv1)
    b) !cgroupv1 -> remove label to run the build on a cgroup.v1 node.
       E.g. jenkins build xlinux(!cgroupv1)
    c) cgroupv2 -> add label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(cgroupv2)
    d) !cgroupv2 -> remove label to run the build on a cgroup.v2 node.
       E.g. jenkins build xlinux(!cgroupv2)
    e) docker -> run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv2,docker)
    f) !docker -> do not run the build inside a Docker container.
       E.g. jenkins build xlinux(cgroupv1,!docker)
    g) cmake:'ARGS' -> ARGS will be appended during the configure phase.
       E.g. jenkins build xlinux(cmake:'-DCMAKE_C_FLAGS=-DDUMP_DBG')
    h) compile:'ARGS' -> ARGS will be appended during the compile phase.
       E.g. jenkins build xlinux(compile:'-d')
    i) test:'ARGS' -> ARGS will be appended while running the tests.
       E.g. jenkins build xlinux(test:'-R porttest')
    j) env:'VAR1=VAL1,VAR2=VAL2' -> environment variables will be added.
       E.g. jenkins build xlinux(env:'GTEST_FILTER=PortDumpTest.*')
9.  Example: jenkins build xlinux(<OPTIONS_A>),all
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use their default settings/options.
10. Example: jenkins build xlinux(<OPTIONS_A>),all(<OPTIONS_B>)
    In this example, the xlinux PR build will use OPTIONS_A whereas
    all other PR builds will use OPTIONS_B.
11. Example: jenkins build xlinux(<OPTIONS_A>),all,linux_x86-64(<OPTIONS_B>)
    In this example, xlinux is an alias for linux_x86-64. Two different
    sets of options are provided for the same PR build specfication. The set
    of options of provided at the end will be enforced. In this example,
    OPTIONS_B will be used whereas OPTIONS_A will be ignored. The same
    analogy is also used if N-sets of options are specified for the a PR
    build specification.
12. Related:
    - eclipse-omr#1281
    - eclipse-omr#6468
    - eclipse-omr#6477
    - eclipse-omr#6501

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants