mtpti5iD/redhat-docs_dataset huggingface dataset:
Chapter 3. The gofmt formatting tool Instead of a style guide, the Go programming language uses the gofmt code formatting tool. gofmt automatically formats your code according to the Go layout rules. 3.1. Prerequisites Go Toolset is installed. For more information, see Installing Go Toolset . 3.2. Formatting code You can use the gofmt formatting tool to format code in a given path. When the path leads to a single file, the changes apply only to the file. When the path leads to a directory, all .go files in the directory are processed. Procedure To format your code in a given path, run: On Red Hat Enterprise Linux 8: Replace < code_path > with the path to the code you want to format. On Red Hat Enterprise Linux 9: Replace < code_path > with the path to the code you want to format. Note To print the formatted code to standard output instead of writing it to the original file, omit the -w option. 3.3. Previewing changes to code You can use the gofmt formatting tool to preview changes done by formatting code in a given path. The output in unified diff format is printed to standard output. Procedure To show differences in your code in a given path, run: On Red Hat Enterprise Linux 8: Replace < code_path > with the path to the code you want to compare. On Red Hat Enterprise Linux 9: Replace < code_path > with the path to the code you want to compare. 3.4. Simplifying code You can use the gofmt formatting tool to simplify your code. Procedure To simplify anf format code in a given path, run: On Red Hat Enterprise Linux 8: Replace < code_path > with the path to the code you want to simplify. On Red Hat Enterprise Linux 9: Replace < code_path > with the path to the code you want to simplify. 3.5. Refactoring code You can use the gofmt formatting tool to refactor your code by applying arbitrary substitutions. Procedure To refactor and format your code in a given path, run: On Red Hat Enterprise Linux 8: Replace < code_path > with the path to the code you want to refactor and < rewrite_rule > with the rule you want it to be rewritten by. On Red Hat Enterprise Linux 9: Replace < code_path > with the path to the code you want to refactor and < rewrite_rule > with the rule you want it to be rewritten by. 3.6. Additional resources The official gofmt documentation .

Commands:
gofmt -w < code_path >
gofmt -w < code_path >
gofmt -w -d < code_path >
gofmt -w -d < code_path >
gofmt -s -w < code_path >
gofmt -s -w < code_path >
gofmt -r -w < rewrite_rule > < code_path >
gofmt -r -w < rewrite_rule > < code_path >
Chapter 13. SR-IOV 13.1. Introduction Developed by the PCI-SIG (PCI Special Interest Group), the Single Root I/O Virtualization (SR-IOV) specification is a standard for a type of PCI device assignment that can share a single device to multiple virtual machines. SR-IOV improves device performance for virtual machines. Figure 13.1. How SR-IOV works SR-IOV enables a Single Root Function (for example, a single Ethernet port), to appear as multiple, separate, physical devices. A physical device with SR-IOV capabilities can be configured to appear in the PCI configuration space as multiple functions. Each device has its own configuration space complete with Base Address Registers (BARs). SR-IOV uses two PCI functions: Physical Functions (PFs) are full PCIe devices that include the SR-IOV capabilities. Physical Functions are discovered, managed, and configured as normal PCI devices. Physical Functions configure and manage the SR-IOV functionality by assigning Virtual Functions. Virtual Functions (VFs) are simple PCIe functions that only process I/O. Each Virtual Function is derived from a Physical Function. The number of Virtual Functions a device may have is limited by the device hardware. A single Ethernet port, the Physical Device, may map to many Virtual Functions that can be shared to virtual machines. The hypervisor can map one or more Virtual Functions to a virtual machine. The Virtual Function's configuration space is then mapped to the configuration space presented to the guest. Each Virtual Function can only be mapped to a single guest at a time, as Virtual Functions require real hardware resources. A virtual machine can have multiple Virtual Functions. A Virtual Function appears as a network card in the same way as a normal network card would appear to an operating system. The SR-IOV drivers are implemented in the kernel. The core implementation is contained in the PCI subsystem, but there must also be driver support for both the Physical Function (PF) and Virtual Function (VF) devices. An SR-IOV capable device can allocate VFs from a PF. The VFs appear as PCI devices which are backed on the physical PCI device by resources such as queues and register sets. Advantages of SR-IOV SR-IOV devices can share a single physical port with multiple virtual machines. Virtual Functions have near-native performance and provide better performance than paravirtualized drivers and emulated access. Virtual Functions provide data protection between virtual machines on the same physical server as the data is managed and controlled by the hardware. These features allow for increased virtual machine density on hosts within a data center. SR-IOV is better able to utilize the bandwidth of devices with multiple guests.

Commands:
5.232. pcsc-lite 5.232.1. RHBA-2012:1343 - pcsc-lite bug fix update Updated pcsc-lite packages that fix one bug are now available for Red Hat Enterprise Linux 6. PC/SC Lite provides a Windows SCard compatible interface for communicating with smart cards, smart card readers, and other security tokens. Bug Fix BZ# 851199 Despite the update described in the RHBA-2012:0990 advisory, the chkconfig utility did not automatically place the pcscd init script after the start of the HAL daemon. Consequently, pcscd was unable to recognize USB readers. With this update, the pcscd init script has been changed to explicitly start only after HAL is up, thus fixing this bug. All pcsc-lite users are advised to upgrade to these updated packages, which fix this bug. 5.232.2. RHBA-2012:0990 - pcsc-lite bug fix update Updated pcsc-lite packages that fix one bug are now available for Red Hat Enterprise Linux 6. PC/SC Lite provides a Windows SCard compatible interface for communicating with smart cards, smart card readers, and other security tokens. Bug Fix BZ# 812469 Previously, the pcscd init script pointed to the wrong value to identify the HAL daemon. It also wrongly started at runlevel 2. As a result, chkconfig did not automatically place pcscd after the start of the HAL daemon, thus pcscd failed to see USB readers. With this update, the pcscd init script has been changed to properly identify the HAL daemon and only start at runlevels 3, 4, and 5, thus fixing this bug. All pcsc-lite users are advised to upgrade to these updated packages, which fix this bug.

Commands:
Chapter 6. Software Maintenance Software maintenance is extremely important to maintaining a secure system. It is vital to patch software as soon as it becomes available in order to prevent attackers from using known holes to infiltrate your system. 6.1. Install Minimal Software It is a recommended practice to install only the packages you will use because each piece of software on your computer could possibly contain a vulnerability. If you are installing from the DVD media take the opportunity to select exactly what packages you want to install during the installation. When you find you need another package, you can always add it to the system later. For more information on minimal installation, see the "Package Group Selection" section of the Red Hat Enterprise Linux 6 Installation Guide . A minimal installation can also be performed via a kickstart file using the --nobase option. For more information, see the "Package Selection" section of the Red Hat Enterprise Linux 6 Installation Guide .

Commands:
Chapter 3. Getting started This chapter guides you through the steps to set up your environment and run a simple messaging program. 3.1. Prerequisites You must complete the installation procedure for your environment. You must have an AMQP 1.0 message broker listening for connections on interface localhost and port 5672 . It must have anonymous access enabled. For more information, see Starting the broker . You must have a queue named examples . For more information, see Creating a queue . 3.2. Running Hello World on Red Hat Enterprise Linux The Hello World example creates a connection to the broker, sends a message containing a greeting to the examples queue, and receives it back. On success, it prints the received message to the console. Change to the examples directory and run the helloworld.js example. USD cd <source-dir> /examples USD node helloworld.js Hello World! 3.3. Running Hello World on Microsoft Windows The Hello World example creates a connection to the broker, sends a message containing a greeting to the examples queue, and receives it back. On success, it prints the received message to the console. Change to the examples directory and run the helloworld.js example. > cd <source-dir> /examples > node helloworld.js Hello World!

Commands:
cd <source-dir> /examples node helloworld.js Hello World!
> cd <source-dir> /examples > node helloworld.js Hello World!
8.84. hmaccalc 8.84.1. RHBA-2014:1584 - hmaccalc bug fix update Updated hmaccalc packages that fix one bug are now available for Red Hat Enterprise Linux 6. The hmaccalc packages contain tools to calculate HMAC (Hash-based Message Authentication Code) values for files. The names and interfaces were designed to mimic those of the sha1sum, sha256sum, sha384sum and sha512sum tools provided by the coreutils package. Bug Fix BZ# 1016706 The .hmac files are used to check the kernel image at the boot time; if the check fails, the boot process is expected to be halted. Previously, the hmaccalc utility did not flag empty .hmac files as an error, allowing the system to boot even if the boot was supposed to fail. With this update, a patch has been provided to address this bug. As a result, the system is no longer allowed to boot in the described scenario. Users of hmaccalc are advised to upgrade to these updated packages, which fix this bug.

Commands:
Chapter 1. Overview of Hosts in Satellite A host is any Linux client that Red Hat Satellite manages. Hosts can be physical or virtual. Virtual hosts can be deployed on any platform supported by Red Hat Satellite, such as Amazon EC2, Google Compute Engine, KVM, libvirt, Microsoft Azure, OpenStack, Red Hat Virtualization, Rackspace Cloud Services, or VMware vSphere. Red Hat Satellite enables host management at scale, including monitoring, provisioning, remote execution, configuration management, software management, and subscription management. You can manage your hosts from the Satellite web UI or from the command line. In the Satellite web UI, you can browse all hosts recognized by Satellite Server, grouped by type: All Hosts - a list of all hosts recognized by Satellite Server. Discovered Hosts - a list of bare-metal hosts detected on the provisioning network by the Discovery plug-in. Content Hosts - a list of hosts that manage tasks related to content and subscriptions. Host Collections - a list of user-defined collections of hosts used for bulk actions such as errata installation. To search for a host, type in the Search field, and use an asterisk (*) to perform a partial string search. For example, if searching for a content host named dev-node.example.com , click the Content Hosts page and type dev-node* in the Search field. Alternatively, *node* will also find the content host dev-node.example.com. Warning Satellite Server is listed as a host itself even if it is not self-registered. Do not delete Satellite Server from the list of hosts.

Commands:
28.6. Removing a Replica Deleting or demoting a replica removes the IdM replica from the server/replica topology so that it no longer processes IdM requests and it also removes the host machine itself from the IdM domain. On an IdM server, obtain a Kerberos ticket before running IdM tools. List all of the configured replication agreements for the IdM domain. Removing the replica from the topology involves deleting all the agreements between the replica and the other servers in the IdM domain and all of the data about the replica in the domain configuration. If the replica was configured with its own CA , then also use the ipa-csreplica-manage command to remove all of the replication agreements between the certificate databases for the replica. This is required if the replica itself was configured with a Dogtag Certificate System CA. It is not required if only the master server or other replicas were configured with a CA. On the replica, uninstall the replica packages.

Commands:
kinit admin
ipa-replica-manage list Directory Manager password: ipaserver.example.com: master ipaserver2.example.com: master replica.example.com: master replica2.example.com: master
ipa-replica-manage del replica.example.com
ipa-csreplica-manage del replica.example.com
ipa-server-install --uninstall -U
Chapter 1. Kernel Enhanced SCSI Unit Attention Handling The kernel in Red Hat Enterprise Linux 6.6 has been enhanced to enable user space to respond to certain SCSI Unit Attention conditions received from SCSI devices via the udev event mechanism. The supported Unit Attention conditions are: 3F 03 INQUIRY DATA HAS CHANGED 2A 09 CAPACITY DATA HAS CHANGED 38 07 THIN PROVISIONING SOFT THRESHOLD REACHED 2A 01 MODE PARAMETERS CHANGED 3F 0E REPORTED LUNS DATA HAS CHANGED Because SCSI Unit Attention conditions are only reported in response to a SCSI command, no conditions are reported if no commands are actively being sent to the SCSI device. Red Hat Enterprise Linux 6.6 does not provide any default udev rules for these events, but user-supplied udev rules can be written to handle them. For example, the following rule causes a SCSI device to be rescanned if the inquiry data changes: The rules for the supported events should match on the following SDEV_UA environment strings: Note that in all cases the DEVPATH environment variable in the udev rule is the path of the device that reported the Unit Attention. Also, multipath I/O currently verifies that multiple paths to a device have some of the same attributes, such as the capacity. As a consequence, automatically rescanning a device in response to a capacity change can cause that some paths to a device have the old capacity and some paths have the new capacity. In such cases, multipath I/O stops using paths with the capacity change. Open vSwitch Kernel Module Red Hat Enterprise Linux 6.6 includes the Open vSwitch kernel module as an enabler for Red Hat's layered products. Open vSwitch is supported only in conjunction with products that contain the accompanying user-space utilities. Please note that without these required user-space utilities, Open vSwitch will not function and cannot be enabled for use. For more information, please refer to the following Knowledge Base article: https://access.redhat.com/knowledge/articles/270223 .

Commands:
ACTION=="change", SUBSYSTEM=="scsi", ENV{SDEV_UA}=="INQUIRY_DATA_HAS_CHANGED", TEST=="rescan", ATTR{rescan}="x"
ENV{SDEV_UA}=="INQUIRY_DATA_HAS_CHANGED" ENV{SDEV_UA}=="CAPACITY_DATA_HAS_CHANGED" ENV{SDEV_UA}=="THIN_PROVISIONING_SOFT_THRESHOLD_REACHED" ENV{SDEV_UA}=="MODE_PARAMETERS_CHANGED" ENV{SDEV_UA}=="REPORTED_LUNS_DATA_HAS_CHANGED"
Chapter 4. Advisories related to this release The following advisories have been issued to bugfixes and to CVE fixes included in this release: RHSA-2023:0190 RHSA-2023:0191 RHSA-2023:0192 RHSA-2023:0193 RHSA-2023:0194 Revised on 2024-05-03 15:36:43 UTC

Commands:
Chapter 3. Spring and Spring Boot 3.1. Spring and Spring Boot tutorials Note These code tutorials use Data Grid Server and require at least one running instance. Run Spring examples Two simple tutorials can be run with Spring without Spring Boot: Test caching Test annotations Run Spring Boot examples USD mvn -s /path/to/maven-settings.xml spring-boot:run Displaying actuator statistics Navigate to http://localhost:8080/actuator/metrics in your browser to display a list of available metrics. Cache metrics are prefixed with "cache." Display each metric for each cache using tags. For example for the 'puts' stats in the basque-names cache: http://localhost:8080/actuator/metrics/cache.puts?tag=name:basque-names Collecting statistics with Prometheus The prometheus.yml file in this project contains a host.docker.internal binding that allows Prometheus to scrap metrics that the Spring actuator exposes. Change the YOUR_PATH value in the following command to the directory where Prometheus is running and then run: Podman USD podman run -d --name=prometheus -p 9090:9090 -v YOUR_PATH/integrations/spring-boot/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus --config.file=/etc/prometheus/prometheus.yml Tutorial link Description Spring Boot and Spring Cache remote mode Demonstrates how to use Spring Caches with Spring Boot and the Data Grid Server. Spring Boot and Spring Session remote mode Demonstrates how to use Spring Session with Spring Boot and the Data Grid Server. Spring Boot and Spring Cache embedded mode Demonstrates how to use Spring Caches with Spring Boot and Data Grid Embedded. Spring Boot and Spring Session embedded mode Demonstrates how to use Spring Session with Spring Boot and Data Grid Embedded. Spring cache embedded without Spring Boot Demonstrates how to use Spring Cache and Data Grid Embedded without Spring Boot. Data Grid documentation You can find more resources in our documentation at: Using Data Grid with Spring Data Grid Spring Boot Starter

Commands:
{package_exec}@spring-caching
{package_exec}@spring-annotations
mvn -s /path/to/maven-settings.xml spring-boot:run
podman run -d --name=prometheus -p 9090:9090 -v YOUR_PATH/integrations/spring-boot/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus --config.file=/etc/prometheus/prometheus.yml
5.18. brltty 5.18.1. RHBA-2012:1231 - brltty bug fix update Updated brltty packages that fix two bugs are now available for Red Hat Enterprise Linux 6. BRLTTY is a background process (daemon) which provides access to the Linux console (when in text mode) for a blind person using a refreshable braille display. It drives the braille display, and provides complete screen review functionality. Bug Fixes BZ# 684526 Previously, building the brltty package could fail on the ocaml's unpackaged files error. This happened only if the ocaml package was pre-installed in the build root. The "--disable-caml-bindings" option has been added in the %configure macro so that the package now builds correctly. BZ# 809326 Previously, the /usr/lib/libbrlapi.so symbolic link installed by the brlapi-devel package incorrectly pointed to ../../lib/libbrlapi.so. The link has been fixed to correctly point to ../../lib/libbrlapi.so.0.5. All users of brltty are advised to upgrade to these updated packages, which fix these bugs.

Commands:
Chapter 252. OpenStack Glance Component Available as of Camel version 2.19 The openstack-glance component allows messages to be sent to an OpenStack image services. 252.1. Dependencies Maven users will need to add the following dependency to their pom.xml. pom.xml <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-openstack</artifactId> <version>USD{camel-version}</version> </dependency> where USD{camel-version } must be replaced by the actual version of Camel. 252.2. URI Format openstack-glance://hosturl[?options] You can append query options to the URI in the following format ?options=value&option2=value&... 252.3. URI Options The OpenStack Glance component has no options. The OpenStack Glance endpoint is configured using URI syntax: with the following path and query parameters: 252.3.1. Path Parameters (1 parameters): Name Description Default Type host Required OpenStack host url String 252.3.2. Query Parameters (8 parameters): Name Description Default Type apiVersion (producer) OpenStack API version V3 String config (producer) OpenStack configuration Config domain (producer) Authentication domain default String operation (producer) The operation to do String password (producer) Required OpenStack password String project (producer) Required The project ID String username (producer) Required OpenStack username String synchronous (advanced) Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). false boolean 252.4. Spring Boot Auto-Configuration The component supports 2 options, which are listed below. Name Description Default Type camel.component.openstack-glance.enabled Enable openstack-glance component true Boolean camel.component.openstack-glance.resolve-property-placeholders Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. true Boolean 252.5. Usage Operation Description reserve Reserve image. create Create new image. update Update image. upload Upload image. get Get the image. getAll Get all image. delete Delete the image. 252.5.1. Message headers evaluated by the Glance producer Header Type Description operation String The operation to perform. ID String ID of the flavor. name String The flavor name. diskFormat org.openstack4j.model.image.DiskFormat The number of flavor VCPU. containerFormat org.openstack4j.model.image.ContainerFormat Size of RAM. owner String Image owner. isPublic Boolean Is public. minRam Long Minimum ram. minDisk Long Minimum disk. size Long Size. checksum String Checksum. properties Map Image properties. 252.6. See Also Configuring Camel Component Endpoint Getting Started openstack Component

Commands:
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-openstack</artifactId> <version>USD{camel-version}</version> </dependency>
openstack-glance://hosturl[?options]
openstack-glance:host
12.3.2. Deleting a Storage Pool Using virt-manager This procedure demonstrates how to delete a storage pool. To avoid any issues with other guest virtual machines using the same pool, it is best to stop the storage pool and release any resources in use by it. To do this, select the storage pool you want to stop and click the red X icon at the bottom of the Storage window. Figure 12.11. Stop Icon Delete the storage pool by clicking the Trash can icon. This icon is only enabled if you stop the storage pool first.

Commands: