X

News, tips, partners, and perspectives for the Oracle Linux operating system and upstream Linux kernel work

Recent Posts

Linux

How to setup WireGuard on Oracle Linux

Oracle Linux engineer William Kucharski provides an introduction to the VPN protocol WireGuard   WireGuard has received a lot of attention of late as a new, easier to use VPN mechanism, and it has now been added to Unbreakable Enterprise Kernel 6 Update 1 as a technology preview. But what is it, and how do I use it? What is WireGuard? WireGuard is described by its developers as: an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. (You can read the full statement from the developers here.) Though IPsec works well and is indeed a standard for secure communication, it can be difficult to configure and use for those not familiar with network administration. By comparison, WireGuard is reasonably easy to set up, and "aims to be as easy to configure and deploy as SSH." Linus Torvalds paid it perhaps the ultimate compliment on LKML not too long before the code was merged into the 5.6 kernel: Can I just once again state my love for it and hope it gets merged soon? Maybe the code isn’t perfect, but I’ve skimmed it, and compared to the horrors that are OpenVPN and IPSec, it’s a work of art. If you are curious about the inner workings of WireGuard, you can read the protocol in the original technical whitepaper. If you prefer video, a nice session on WireGuard was given at the 2018 Linux Plumber's Conference in Vancouver, viewable here. How does it work? Quoting its authors: WireGuard associates tunnel IP addresses with public keys and remote endpoints. When the interface sends a packet to a peer, it does the following: This packet is meant for 192.168.30.8. Which peer is that? Let me look... Okay, it's for peer ABCDEFGH. (Or if it's not for any configured peer, drop the packet.) Encrypt entire IP packet using peer ABCDEFGH's public key. What is the remote endpoint of peer ABCDEFGH? Let me look... Okay, the endpoint is UDP port 53133 on host 216.58.211.110. Send encrypted bytes from step 2 over the Internet to 216.58.211.110:53133 using UDP. When the interface receives a packet, this happens: I just got a packet from UDP port 7361 on host 98.139.183.24. Let's decrypt it! It decrypted and authenticated properly for peer LMNOPQRS. Okay, let's remember that peer LMNOPQRS's most recent Internet endpoint is 98.139.183.24:7361 using UDP. Once decrypted, the plain-text packet is from 192.168.43.89. Is peer LMNOPQRS allowed to be sending us packets as 192.168.43.89? If so, accept the packet on the interface. If not, drop it. Behind the scenes there is much happening to provide proper privacy, authenticity, and perfect forward secrecy, using state-of-the-art cryptography. Let's see a sample configuration! The following assumes you have WireGuard installed on the machines you've decided to use as your client and server, and that the two machines can connect to one another. You can verify WireGuard is installed by using the following commands: rpm -qa | grep wireguard modinfo wireguard The first should show that the package wireguard-tools is installed and the second should show information on the wireguard kernel module. For the sake of simplicity, I will demonstrate a configuration using IPv4 addresses, though the parameters in the setup files will support IPv6 addresses. Assume the current IP addresses for the two systems' eno1 interfaces are: 10.0.0.1 server 10.0.0.2 client and we want to use WireGuard addresses of: 192.168.2.1 server 192.168.2.2 client you would follow these steps: Server Configuration, Part One Start by generating a crypto key pair: a public key and a private key. Run the following commands on the machine you've selected as your server as root. If your system does not allow logins as root, add sudo commands as necessary: cd /etc/wireguard umask 077 wg genkey | tee privatekey | wg pubkey > publickey This will generate the initial private and public crypto keys needed to start the tunnel and store them in the files privatekey and publickey respectively. Next, edit the file /etc/sysctl.conf and make the following changes (note that depending upon your prior configuration, these values may have already been set elsewhere in the file and you may need to edit those lines appropriately): net.ipv4.ip_forward = 1 net.ipv6.conf.all.forwarding = 1 Then use the sysctl command to make the system reread the /etc/sysctl.conf configuration file: sysctl -p (You can safely ignore any errors that are output about files that sysctl cannot stat.) Client Configuration As you did for the server, you will need to generate a crypto key pair: cd /etc/wireguard umask 077 wg genkey | tee privatekey | wg pubkey > publickey Now edit the file /etc/wireguard/wg0.conf to read: [Interface] Address = 192.168.2.2/24 SaveConfig = true ListenPort = 60477 PrivateKey = <contents of /etc/wireguard/privatekey> [Peer] PublicKey = <contents of the server's /etc/wireguard/publickey file> AllowedIPs = 0.0.0.0/0, ::/0 Endpoint = 10.0.0.1:51820 Server Configuration Part Two and Bringup Edit the file /etc/wireguard/wg0.conf so that it looks like this: [Interface] Address = 192.168.2.1/24 SaveConfig = true PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eno1 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eno1 -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eno1 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eno1 -j MASQUERADE ListenPort = 51820 PrivateKey = <contents of /etc/wireguard/privatekey> [Peer] PublicKey = <contents of the client's /etc/wireguard/publickey file> AllowedIPs = 192.168.2.2/32 Endpoint = 10.0.0.2:60477 That's it! Run the wg-quick command to start the server: wg-quick up wg0 you will see output something like: [#] ip link add wg0 type wireguard [#] wg setconf wg0 /dev/fd/63 [#] ip link set mtu 1420 up dev wg0 [#] ip -4 route add 192.168.2.2/32 dev wg0 [#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eno1 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eno1 -j MASQUERADE At this point, you can confirm the status of the interface by using the wg command, which will generate output like: # wg interface: wg0 public key: _server public key_ private key: (hidden) listening port: 51820 peer: <client public key> endpoint: 10.129.135.30:60477 allowed ips: 192.168.2.2/32 Client Bringup The next step is to activate the secure tunnel that will tunnel all of your client's network traffic, encrypted, through the server. Be sure to be on the console when you perform this operation. As all network traffic will now be routed through the tunnel, if you run these commands while connected via ssh you will lose your connection and will not be able to reconnect except by logging in on the machine's console. As on the server, use the wg-quick command: wg-quick up wg0 you will see output that looks like: [#] ip link add wg0 type wireguard [#] wg setconf wg0 /dev/fd/63 [#] ip -4 address add 192.168.2.2/24 dev wg0 [#] ip link set mtu 1420 up dev wg0 [#] ip -6 route add ::/0 dev wg0 table 51820 [#] ip -6 rule add not fwmark 51820 table 51820 [#] ip -6 rule add table main suppress_prefixlength 0 [#] ip6tables-restore -n [#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820 [#] ip -4 rule add not fwmark 51820 table 51820 [#] ip -4 rule add table main suppress_prefixlength 0 [#] sysctl -q net.ipv4.conf.all.src_valid_mark=1 [#] iptables-restore -n Again, you can check on the status of the client using the wg command, which will generate output similar to: # wg interface: wg0 public key: <client public key> private key: (hidden) listening port: 60477 fwmark: 0xca6c peer: <server public key> endpoint: 10.0.0.1:51820 allowed ips: 0.0.0.0/0, ::/0 Use At this point, the tunnel should be up and functioning, and you should be able to issue network commands from your client machine and have them operate as usual, except traffic will be going through the WireGuard tunnel to the server. Once you have performed network operations from the client, the wg command will show usage data in addition to the configuration information it showed earlier. For example, a ping might look like this: # ping oracle.com PING oracle.com (137.254.16.101) 56(84) bytes of data. 64 bytes from bigip-ocoma-cms-adc.oracle.com (137.254.16.101): icmp_seq=1 ttl=240 time=41.9 ms 64 bytes from bigip-ocoma-cms-adc.oracle.com (137.254.16.101): icmp_seq=2 ttl=240 time=42.0 ms --- oracle.com ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 2002ms tt min/avg/max/mdev = 32.074/32.085/32.106/0.014 ms # wg interface: wg0 public key: <client public key> private key: (hidden) listening port: 60477 fwmark: 0xca6c peer: <server public key> endpoint: 10.0.0.1:51820 allowed ips: 0.0.0.0/0, ::/0 latest handshake: 3 seconds ago transfer: 1.56 KiB received, 756 B sent You can see that the latest handshake was three seconds ago with 1,560 bytes received from and 756 bytes sent to the tunneled connection. Client Teardown To close the tunnel and restore normal network operation, use the wg-quick command: # wg-quick down wg0 [#] wg showconf wg0 [#] ip -4 rule delete table 51820 [#] ip -4 rule delete table main suppress_prefixlength 0 [#] ip -6 rule delete table 51820 [#] ip -6 rule delete table main suppress_prefixlength 0 [#] ip link delete dev wg0 [#] iptables-restore -n [#] ip6tables-restore -n Server Teardown To shut down the WireGuard server, once again the wg-quick command is used: # wg-quick down wg0 [#] wg showconf wg0 [#] ip link delete dev wg0 [#] iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eno1 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eno1 -j MASQUERADE Conclusion As with any network protocol, connection details are precise, but WireGuard definitely is much easier to configure and use than IPsec. Further, a variety of clients are available for other operating systems as well allowing you to provide secure communications for an entire organization quite easily as compared to other methods. This factor alone may make WireGuard a de facto standard for VPN creation in the near future.

Oracle Linux engineer William Kucharski provides an introduction to the VPN protocol WireGuard   WireGuard has received a lot of attention of late as a new, easier to use VPN mechanism, and it has now...

Linux

Oracle Linux 8: Networking made easy with free videos

Thanks to Craig McBride for this post. Training Tuesday Edition - IV This week’s blog presents a set of free, short videos on performing network configuration functions on Oracle Linux 8. Being able to configure networks is an essential skill to access programs, storage and data on remote systems. This video series also covers firewall configuration required to keep your networks safe and secure from intruders. Oracle Linux 8 handles network communications through software configuration files and the network interface cards (NICs) in your system. NetworkManager is the default networking service in Oracle Linux 8 and includes a command-line tool, nmcli to create, display, edit, delete, activate, and deactivate network connections. You can use the ip command to display the status of a network interface, configure network properties, or for debugging or tuning the network. A firewall serves as the computer equivalent of a physical wall, gate, or fence to keep intruders out and protect what's inside. The default firewall service in Oracle Linux 8 is firewalld. In Oracle Linux 8, nftables replaced iptables, and firewalld interacts with nftables. Here’s the list of videos and the time it takes for you to complete each one: video Network Configuration Files on Oracle Linux 8 (7 Min) video Using NetworkManager CLI (nmcli) on Oracle Linux 8 (7 Min) video Using the ip command on Oracle Linux 8 (9 Min) video Introduction to using firewalld on Oracle Linux 8 (8 Min) video Using nftables on Oracle Linux 8 (7 Min) Be sure to come back for our next edition, which will cover Oracle Ksplice.  New videos are added on an ongoing basis so check back often. Resources: Oracle Linux Oracle Linux 8 training videos Oracle Linux 8 product documentation Watch the previous Training Tuesday episodes: I: Oracle Linux 8: Installation made easy with free videos II: Oracle Linux 8: Administration made easy with free videos III: Oracle Linux 8: Package Management made easy with free videos

Thanks to Craig McBride for this post. Training Tuesday Edition - IV This week’s blog presents a set of free, short videos on performing network configuration functions on Oracle Linux 8. Being able to...

Linux

RackWare: A solution for moving workloads to Oracle Linux KVM

RackWare has certified its RackWare Management Module (RMM) hybrid cloud management solution for Oracle Linux KVM on both Oracle Linux 7 and 8. RMM is also available on Oracle Cloud Infrastructure. RMM’s high level of automation uniquely differentiates it and helps customers reduce labor costs related to the deployment and management of IT applications. Customers are looking for an enterprise KVM solution as an alternative to an expensive proprietary virtualization deployment. They are also looking for an easier migration path to the cloud. One solution is RackWare's RMM. RMM is a hypervisor-agnostic file system-based replication technology that can help migrate workloads from other hypervisors to Oracle Linux KVM. RackWare supports a range of use cases for workloads running on bare metal servers, virtual machines, or containers. Customers can move Windows, Linux, or Kubernetes/Container deployments from one data center or cloud to another data center or cloud. For more information on RackWare solutions for deployment with Oracle Linux KVM on premises and in Oracle Cloud Infrastructure, visit: RackWare certifications on Oracle Linux RackWare and Oracle RackWare Enables Container Migration to Oracle Cloud Container Engine for Kubernetes Migration and Disaster Recovery in the Oracle Cloud with RackWare Oracle.com/linux Oracle.com/virtualization  

RackWare has certified its RackWare Management Module (RMM) hybrid cloud management solution for Oracle Linux KVM on both Oracle Linux 7 and 8. RMM is also available on Oracle Cloud Infrastructure....

Announcements

Announcing the release of Oracle Linux 8 Update 3

Oracle is pleased to announce the availability of the Oracle Linux 8 Update 3 for the 64-bit Intel and AMD (x86_64) and 64-bit Arm (aarch64) platforms.  Oracle Linux brings the latest open source innovations and business-critical performance and security optimizations for cloud and on-premises deployment. Oracle Linux maintains user space compatibility with Red Hat Enterprise Linux (RHEL), which is independent of the kernel version that underlies the operating system. Existing applications in user space will continue to run unmodified on Oracle Linux 8 Update 3 with Unbreakable Enterprise Kernel Release 6 (UEK R6) and no re-certifications are needed for applications already certified with Red Hat Enterprise Linux 8 or Oracle Linux 8. Oracle Linux 8 Update 3 includes the UEK R6 on the installation image, along with the Red Hat Compatible Kernel (RHCK). For new installations, UEK R6 is enabled and installed by default and is the default kernel on first boot. UEK R6, the kernel developed, built, and tested by Oracle and based on the mainline Linux Kernel 5.4, delivers more innovation than other commercial Linux kernels.  Oracle Linux 8 Update 3 release includes: Graphical Installer Improved support for NVDIMM devices Improved support for ipv6 static configurations Installation program uses the default LUKS2 version for an encrypted container Graphical installation program includes the "root password" and "user creation settings" in the Installation Summary screen Red Hat Compatible Kernel (RHCK) lshw command provides additional CPU information /dev/random and /dev/urandom conditionally powered by the Kernel Crypto API DRBG Extended Berkeley Packet Filter added for kernel virtual machines (KVM) libbpf support now available Mellanox ConnectX-6 Dx network adapter included and driver automatically loaded TSX disabled by default on Intel CPUs that support disabling it Dynamic Programming Languages Ruby 2.7.1 module stream  Nodejs:14 module stream  python38:3.8 module stream  php:7.4 module stream  nginx:1.18 module stream  perl:5.30 module stream  squid:4 module stream updated to version 4.11 httpd:2.4 module stream enhanced git packages updated to version 2.27 Infrastructure Services Bind, updated to version 9.11, provides increased reliability on systems that have multiple CPU cores and more detailed error detection, and improvements to other tools Powertop updated to version 2.12 Tuned updated to version 2.14.0 tcpdump, updated to version 4.9.3, includes bug and security fixes iperf3 includes enhancement, bug and security fixes, and introduces support for SSL Security gnutls updated to version 3.6.14 Libreswan updated to version 3.32 libseccomp library updated to version 2.4.3 libkcapi updated to version 1.2.0 libssh library updated to version 0.9.4 setools updated to version 4.3.0 stunnel updated to version 5.56 SCAP and OpenSCAP improvements OpenSCAP updated to version 1.3.3 SCAP Workbench tool can generate results-based remediation from tailored profiles scap-security-guide packages updated to version 0.1.50 SELinux improvements fapolicyd packages updated to version 1.0 Individual CephFS files and directories can include SELinux labels Additional updates NVMe/TCP available as a Technology Preview on RHCK and fully supported on UEK R6 GCC Toolset release 10 available as Application Stream Pacemaker updated to release 2.0.4 Virtualization improvements focused on KVM hypervisor Oracle Linux 8 Update 3 includes the following kernel packages: kernel-uek-5.4.17-2011.7.4 for x86_64 and aarch64 platforms - The Unbreakable Enterprise Kernel Release 6, which is the default kernel. kernel-4.18.0-221 for x86_64 platform - The latest Red Hat Compatible Kernel (RHCK). For more details about these and other new features and changes, please consult the Oracle Linux 8 Update 3 Release Notes and Oracle Linux 8 Documentation. Oracle Linux downloads Individual RPM packages are available on the Unbreakable Linux Network (ULN) and the Oracle Linux yum server. ISO installation images are available for download from the Oracle Linux yum server and container images are available via Oracle Container Registry, GitHub Container Registry and Docker Hub. Oracle Linux can be downloaded, used, and distributed free of charge and all updates and errata are freely available. Customers decide which of their systems require a support subscription. This makes Oracle Linux an ideal choice for development, testing, and production systems. The customer decides which support coverage is best for each individual system while keeping all systems up to date and secure. For more information about Oracle Linux, please visit www.oracle.com/linux.

Oracle is pleased to announce the availability of the Oracle Linux 8 Update 3 for the 64-bit Intel and AMD (x86_64) and 64-bit Arm (aarch64) platforms.  Oracle Linux brings the latest open source...

Events

WEBINAR: 5 ways to simplify your digital transformation - An analyst view

Sriram Subramanian, Research Director IDC Register today: NA/LAT : December 10th, 10 am PST | 1 pm EST EMEA : December 15th,  10:00 am GMT | 11:00 am CET JAPAC: December 15th,  11:00 am GST Without the right foundation many digital transformation (DX) projects keep growing in complexity and end up failing. What criteria are you using to ensure your technology investments actually help achieve your business goals? Join our panel discussion to learn from an IDC analyst about their research and recommendations for implementing successful DX projects. Topics covered: Trends in Enterprise Business Applications Acceleration through hybrid cloud infrastructure A solid foundation for digital transformation 5 recommendations on how to simplify your DX projects Featured speakers: Sriram Subramanian, Research Director, IDC Infrastructure Systems, Platforms and Technologies Group Robert Shimp, Oracle Group VP Infrastructure Software and Product Strategy Karen Sigman, Oracle Marketing VP, Linux and Virtualization Marketing   Register today for this insightful webinar: NA/LAT : December 10th 10 am PST | 1 pm EST EMEA : December 15th 10:00 am GMT | 11:00 am CET JAPAC: December 15th 11:00 am GST  

Sriram Subramanian, Research Director IDC Register today: NA/LAT : December 10th, 10 am PST | 1 pm EST EMEA : December 15th,  10:00 am GMT | 11:00 am CET JAPAC: December 15th,  11:00 am GST Without the...

Announcements

Announcing the Unbreakable Enterprise Kernel Release 6 Update 1 for Oracle Linux

The Unbreakable Enterprise Kernel (UEK) for Oracle Linux provides the latest open source innovations, key optimizations, and security to cloud and on-premises workloads. It is the Linux kernel that powers Oracle Cloud and Oracle Engineered Systems such as Oracle Exadata Database Machine and Oracle Linux on 64-bit Intel and AMD or 64-bit Arm platforms. UEK Release 6 maintains compatibility with the Red Hat Compatible Kernel (RHCK) and does not disable any features that are enabled in RHCK. Additional features are enabled to provide support for key functional requirements and patches are applied to improve performance and optimize the kernel. What's New? The Unbreakable Enterprise Kernel Release 6 Update 1 (UEK R6U1) for Oracle Linux is based on the mainline kernel version 5.4. Through actively monitoring upstream check-ins and collaboration with partners and customers, Oracle continues to improve and apply critical bug and security fixes to UEK R6. This update includes several new features, added functionality, and bug fixes across a range of subsystems. UEK R6U1 can be recognized with a release number starting with 5.4-17-2036. Notable changes: Padata replaces ktask. Padata is a mechanism by which the kernel can farm jobs out to be done in parallel on multiple CPUs while optionally retaining their ordering. Oracle initially contributed padata to the mainline kernel and continues to provide ongoing development of the padata implementation in the upstream kernel and helped advance padata as the framework for parallelizing CPU-intensive work in the kernel, replacing ktask.  Improvements, bug and security fixes for Btrfs, CIFS, ext4, NFS, OCFS2 and XFS filesystems. Drivers AMD-TEE drivers, amdtee and tee, are new additions in this release to include mainline kernel updates for the AMD Milan CPU family. Atheros 802.11n HTC are updated for security fixes, including CVE-2019-19073. Broadcom BCM573xx network driver, bnxt_en, is available at version 1.10.1 and includes vendor supplied patches and updates. Intel Ethernet Connection E800 Series Linux driver, ice, is updated to version 0.8.2-k to enable support for newer Intel 800-Series Ethernet controllers and PCIe cards. Broadcom Emulex LightPulse Fibre Channel SCSI driver, lpfc, is updated to version 12.8.0.3 with vendor supplied patches and bug fixes. Broadcom MegaRAID SAS driver, megaraid_sas, is updated to version 07.714.04.00-rc1. LSI MPT Fusion SAS 3.0 device driver, mpt3sas, is updated to version 34.100.00.00 to include vendor supplied patches. QLogic Fibre Channel HBA driver, qla2xxx, is updated to version 10.01.00.25-k and includes a large number of vendor supplied patches. Realtek RTL8152/RTL8153-based USB Ethernet Adapter driver, r8152, is updated to version 1.10.11 with upstream kernel patches. Intel VMD (Volume Management Device) driver, vmd, version 0.6 is added to this kernel release and enables serviceability of NVMe devices. Tech-Preview features Core scheduling is a feature enabled in the kernel to limit trusted tasks to run concurrently on CPU cores that share compute resources to help mitigate against certain categories of 'core shared cache' processor bugs that could cause data leakage and other related vulnerabilities. Wireguard is a faster and more secure replacement for IPsec and OpenVPN. New networks are being built with modern cryptography from WireGuard rather than legacy technologies like IPsec and OpenVPN. WireGuard is enabled as a technical preview in UEK R6U1 and introduces the wireguard kernel module at version 1.0.20200712. NFS v4.2 Server Side Copy functionality is back-ported from the upstream kernel and provides mechanisms that allow an NFS client to copy file data on a server or between two servers without the data being transmitted back and forth over the network through the NFS client. For details on these and other new features and changes, please consult the Release Notes for the UEK R6 Update 1. Security (CVE) Fixes A full list of CVEs fixed in this release can be found in the Release Notes for the UEK R6U1. Software Download Oracle Linux can be downloaded, used, and distributed free of charge and all updates and errata are freely available. This allows organizations to decide which systems require a support subscription and makes Oracle Linux an ideal choice for development, testing, and production systems. The user decides which support coverage is the best for each system individually, while keeping all systems up-to-date and secure. Customers with Oracle Linux Premier Support also receive access to zero-downtime kernel updates using Oracle Ksplice. Compatibility UEK R6 Update 1 is fully compatible with the UEK R6 GA release. The kernel ABI for UEK R6 remains unchanged in all subsequent updates to the initial release. About Oracle Linux Oracle Linux is an open and complete operating environment that helps accelerate digital transformation. It delivers leading performance and security for hybrid and multicloud deployments. Oracle Linux is 100% application binary compatible with Red Hat Enterprise Linux. And, with an Oracle Linux Support subscription, customers have access to award-winning Oracle support resources and Linux support specialists, zero-downtime patching with Ksplice, cloud native tools such as Kubernetes and Kata Containers, KVM virtualization and oVirt-based virtualization manager, DTrace, clustering tools, Spacewalk, Oracle Enterprise Manager, and lifetime support. All this and more is included in a single cost-effective support offering. Unlike many other commercial Linux distributions, Oracle Linux is easy to download and completely free to use, distribute, and update.

The Unbreakable Enterprise Kernel (UEK) for Oracle Linux provides the latest open source innovations, key optimizations, and security to cloud and on-premises workloads. It is the Linux kernel that...

Linux

QEMU Live Update

In this blog Oracle Linux Kernel engineers Steve Sistare and Mark Kanda present QEMU live update.   The ability to update software with critical bug fixes and security mitigations while minimizing downtime is extremely important to customers and cloud service providers. In this blog post, we present QEMU Live Update, a new method for updating a running QEMU instance to a new version while minimizing the impact to the VM guest. The guest pauses briefly, for less than 100 milliseconds in our prototype, without loss of internal state or external connections. Live Update uses resources more efficiently than Live Migration. The latter ties up the source and target hosts, and consumes more memory and network bandwidth, and does so for an indeterminate period of time that depends on when the copy phase converges. Live migration is prohibitively expensive if large local storage must be copied across the network to the target. Implementation Live Update preserves the guest state across an exec of a new QEMU binary. It does so by leveraging QEMU's live migration vmstate framework. We enhance QEMU's existing functionality for saving and restoring VM state to allow a guest to be quickly suspended and resumed. The guest RAM is preserved across the exec and mapped at the same virtual address via a proposed madvise option called MADV_DOEXEC. This option preserves the physical pages and virtual mappings of a memory range, and works for MAP_ANON memory. Briefly, madvise sets a flag in each vma struct covering the range, and exec copies flagged vma's from the old mm struct to the new mm, much like fork. See the patch for details. The live update sequence consists of updating the QEMU binary, pausing the guest, saving the VM state, exec'ing the new QEMU binary, restoring the VM state, and resuming the guest. This implementation requires changes to QEMU and the Linux memory management framework, but no changes are required in system libraries or the KVM kernel module. Two new QEMU QMP/HMP commands are utilized: cprsave and cprload. cprsave cprsave pauses the guest to prevent further modifications to guest RAM and block devices and saves the VM state to a file. Unlike the existing savevm command, cprsave supports any type of guest image and block device. cprsave has two modes of operation: restart, for updating QEMU only, and reboot, for updating and rebooting the host kernel. Reboot is discussed later. With cprsave restart, the address and length of the RAM blocks are saved as environment variables and the RAM is tagged with the MADV_DOEXEC option to preserve it across the exec. Finally, the new QEMU binary is exec'd with the original command line arguments. After exec, QEMU reads the environment variables to find the RAM blocks, rather than allocating memory as it normally would. cprload cprload recreates the VM using the file produced by cprsave. Guest block devices are used as-is, so the contents of such devices must not be modified between the cprsave and cprload operations. If the VM was running when cprsave was executed, the VM execution will be resumed. External Connections External connections, such as the guest console, QMP connections, and vhost devices, are preserved across the update. Upon cprsave, the associated file descriptors' close-on-exec flags are cleared and the descriptors are saved as environment variables. Upon restart, QEMU finds the file descriptor environment variables, reuses them by associating them with the corresponding devices, and skips the related configuration steps. VFIO VFIO PCI devices are preserved in a similar manner. At creation time, the QEMU VFIO file descriptors (container, group, device, eventfd) are saved as environment variables. Upon cprsave, the vmstate MSI message area is saved, and all preserved file descriptors' close-on-exec flags are cleared. Upon restart, QEMU finds the file descriptor environment variables, reuses them, and skips the related configuration steps for the preserved areas (such as device and IOMMU state). Finally, upon cprload, the MSI data is loaded from the file, the preserved irq eventfd's are attached to the new KVM instance, and the guest is resumed. The hardware device itself is not quiesced during the restart, and pending DMA requests will continue to execute, reading from and writing to guest memory. This is safe because MADV_DOEXEC preserves the guest memory in place. Example The following is an example of updating QEMU from v4.2.0 to v4.2.1 on Oracle Linux 7 using the HMP version of cprsave restart. A QEMU software update is performed while the guest is running to minimize downtime. Host Kernel Update and Reboot Many critical fixes can be applied by updating only QEMU, or by ksplice'ing the host kernel and its kvm module. However, if you need to completely update the host kernel, we provide a method for doing so, using cprsave with the reboot mode argument. In this mode, cprsave saves state to a file and exits. You then kexec boot a new kernel and issue cprload. The guest RAM must be backed by a persistent shared memory file, such as device DAX or a /dev/shm file that is preserved across kexec via Anthony Yznaga's proposed PKRAM kernel patches. VFIO devices can be preserved if the guest provides an agent that implements suspend to ram, such as qemu-ga. To update, you first issue guest-suspend-ram to the agent, and the guest drivers' suspend methods flush outstanding requests and re-initialize to a reset state -- the same state reached after the host reboots. Thus when the guest resumes, the guest and host agree on the state. Connections from the guest kernel to the outside world survive the reboot. The guest pause time is longer than for restart mode, and depends heavily on the boot time of the kernel and the pre-requisite userland services. Example The following is an example of updating the host kernel on Oracle Linux 7 using the HMP version of cprsave reboot. For more information For more details, see the slides from our recent KVM Forum presentation. Soon, recordings of the 2020 sessions will be available on the KVM forum YouTube channel. We are busily working to bring this functionality to the Linux community. We submitted the first version of the QEMU patches to the qemu-devel email list, and we are working on version 2. Anthony submitted the Linux patches for the madvise option and PKRAM to the Linux kernel email list. Stay tuned for updates.

In this blog Oracle Linux Kernel engineers Steve Sistare and Mark Kanda present QEMU live update.   The ability to update software with critical bug fixes and security mitigations while minimizing...

Linux

Oracle Linux 8: Package Management made easy with free videos

Blog created by Craig McBride Training Tuesday Edition - III Welcome back to Training Tuesdays.  In this week’s edition, we are talking about performing software package management on Oracle Linux 8.  Software package management is an essential skill needed to keep your Oracle Linux 8 system up to date with the latest software enhancements, bug fixes, and security patches. Oracle Linux 8 includes DNF utilities to perform package management. DNF replaces YUM, which was used in previous versions of Oracle Linux. In this 3-part video series, we cover how to use DNF, how to install the latest version of the Unbreakable Enterprise Kernel (UEK) for Oracle Linux, and how to install the Extra Packages for Enterprise Linux (EPEL) software repository. video DNF on Oracle Linux 8 (16 Min) video Installing the Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (4 Min) video Installing the EPEL repository on Oracle Linux 8 (2 Min) Be sure to come back for our next Training Tuesday edition, which will cover networking classes. New training is being added regularly, so bookmark this blog and check back often. Resources: Oracle Linux Oracle Linux 8 training videos Oracle Linux 8 product documentation Watch the previous Training Tuesday episodes: I: Oracle Linux 8: Installation made easy with free videos II: Oracle Linux 8: Administration made easy with free videos  

Blog created by Craig McBride Training Tuesday Edition - III Welcome back to Training Tuesdays.  In this week’s edition, we are talking about performing software package management on Oracle Linux 8. ...

Linux

Multithreaded Struct Page Initialization

Oracle Linux kernel developer Daniel Jordan contributes this post on the initial support for multithreaded jobs in padata.     The last padata blog described unbinding padata jobs from specific CPUs. This post will cover padata's initial support for multithreading CPU-intensive kernel paths, which takes us to the memory management system. The Bottleneck During boot, the kernel needs to initialize all its page structures so they can be freed to the buddy allocator and put to good use. This became expensive as memory sizes grew into the terabytes, so in 2015 Linux got a new feature called deferred struct page initialization that brought the time down on NUMA machines. Instead of a single thread doing all the work, that thread only initialized a small subset of the pages early on, and then per-node threads did the rest later. This helped significantly on systems with many nodes, saving hundreds of seconds on a 24 TB server. However, it left some performance on the table for machines with many cores but not enough nodes to take full advantage of deferred init as it was initially implemented. One of the machines I tested had 2 nodes and 768 GB memory, and its pages took 1.7 seconds to be initialized, by far the largest component of the 4 seconds it took to boot the kernel. That may seem like a small amount of time in absolute terms, but it matters in a few different cases as explained in this changelog: Optimizing deferred init maximizes availability for large-memory systems and allows spinning up short-lived VMs as needed without having to leave them running. It also benefits bare metal machines hosting VMs that are sensitive to downtime. In projects such as VMM Fast Restart, where guest state is preserved across kexec reboot, it helps prevent application and network timeouts in the guests. So there was a need to use more than one thread per node to take full advantage of system memory bandwidth on machines where memory was concentrated over relatively few nodes. The Timing Deferred init turned out to be a good place to start upstreaming support for multithreaded kernel jobs because of how early it happens. This is before userspace is ready, when there is no other significant activity in the system because it is waiting for page initialization to be finished. That allowed delaying many of the prerequisites that the community has deemed necessary for starting these jobs from userspace. These prereqs have come up a few times in the past. They blocked attempts at adding similar functionality for page migration and page zapping, and the community raised them again in the initial versions of this work. The concerns involve both the extent to which the extra threads, known has helpers, respect the resource controls of the main thread, which initiates the job, and whether these extra threads will unduly interfere with other activity on the system. In the first case, the resource that matters for page init threads is CPU consumption, which can be restricted with cgroup's CPU subsystem. The CPU controller, however, only becomes active after boot is finished, so respecting it during page init is not necessary. And in the second case, there is no concern about interfering with other tasks on the system because the page init threads run when the rest of the system is largely idle and waiting for page init to finish. For now, because all the multithreading functions are only used during boot, they are all currently marked with __init so that the kernel can both free the text after boot and enforce that no callers can use them afterward until the proper restrictions are in place. The Implementation For this first step in adding multithreading support, the implementation is thankfully fairly simple. padata, an existing framework that assigns single threads to many small jobs, grew to support assigning many threads to single large jobs. To multithread such a job, the user defines a struct padata_mt_job: struct padata_mt_job { void (*thread_fn)(unsigned long start, unsigned long end, void *arg); void *fn_arg; unsigned long start; unsigned long size; unsigned long align; unsigned long min_chunk; int max_threads; }; The job description contains basic information including a pointer to the thread function, an argument to that function containing any required shared data, and the start and size of the job. start and size are in job-specific units. For deferred init, the unit is page frame numbers (PFNs) to be initialized. A user may pass an alignment, which is useful in the page init case for avoiding cacheline bouncing of page section data between threads. The remaining two fields require a bit more explanation. The first, min_chunk, describes the minimum amount of work that is appropriate for one helper thread to do in one call to the thread function. Like start and size, it is in job-specific units. min_chunk is a hint to keep an inordinate number of threads from being started for too little work, which could hurt performance. During page init, a job is started for each of the deferred PFN ranges, and some of those ranges may be small enough to warrant starting fewer threads than the other job parameters would otherwise allow. The second, max_threads, is simply a cap on the number of threads that can be started for that job. It was not obvious at the beginning of the project what number would work best for all systems, and there was some discussion upstream of setting it to the number of cores on the node, which has performed better than using all SMT CPUs on the node in similar workloads to page init. However, performance testing across several recent CPU types found, surprisingly, that more threads always produced greater speedups, albeit with diminishing returns. Since the system is otherwise idle during page init, though, it made sense to take full advantage of the CPUs. With the job defined, the page init code starts it with padata_do_multithreaded. padata internally decides how many threads to start, taking care to assign work in amounts small enough to load balance between helpers, so they finish at roughly the same time, but large enough to minimize management overhead. The function waits for the job to complete before returning. Multithreaded page init is only available on kernels configured with DEFERRED_STRUCT_PAGE_INIT, and since performance testing has only been done on x86 systems, that is the only architecture where the feature is currently available. Other architectures are free to override deferred_page_init_max_threads with the per-node thread counts right for them. The Results Here are the numbers from all the systems tested. This is the data that led to using all SMT CPUs on a node. Intel(R) Xeon(R) Platinum 8167M CPU @ 2.00GHz (Skylake, bare metal) 2 nodes * 26 cores * 2 threads = 104 CPUs 384G/node = 768G memory kernel boot deferred init ------------------------ ------------------------ node% (thr) speedup time_ms (stdev) speedup time_ms (stdev) ( 0) -- 4089.7 ( 8.1) -- 1785.7 ( 7.6) 2% ( 1) 1.7% 4019.3 ( 1.5) 3.8% 1717.7 ( 11.8) 12% ( 6) 34.9% 2662.7 ( 2.9) 79.9% 359.3 ( 0.6) 25% ( 13) 39.9% 2459.0 ( 3.6) 91.2% 157.0 ( 0.0) 37% ( 19) 39.2% 2485.0 ( 29.7) 90.4% 172.0 ( 28.6) 50% ( 26) 39.3% 2482.7 ( 25.7) 90.3% 173.7 ( 30.0) 75% ( 39) 39.0% 2495.7 ( 5.5) 89.4% 190.0 ( 1.0) 100% ( 52) 40.2% 2443.7 ( 3.8) 92.3% 138.0 ( 1.0) Intel(R) Xeon(R) CPU E5-2699C v4 @ 2.20GHz (Broadwell, kvm guest) 1 node * 16 cores * 2 threads = 32 CPUs 192G/node = 192G memory kernel boot deferred init ------------------------ ------------------------ node% (thr) speedup time_ms (stdev) speedup time_ms (stdev) ( 0) -- 1988.7 ( 9.6) -- 1096.0 ( 11.5) 3% ( 1) 1.1% 1967.0 ( 17.6) 0.3% 1092.7 ( 11.0) 12% ( 4) 41.1% 1170.3 ( 14.2) 73.8% 287.0 ( 3.6) 25% ( 8) 47.1% 1052.7 ( 21.9) 83.9% 177.0 ( 13.5) 38% ( 12) 48.9% 1016.3 ( 12.1) 86.8% 144.7 ( 1.5) 50% ( 16) 48.9% 1015.7 ( 8.1) 87.8% 134.0 ( 4.4) 75% ( 24) 49.1% 1012.3 ( 3.1) 88.1% 130.3 ( 2.3) 100% ( 32) 49.5% 1004.0 ( 5.3) 88.5% 125.7 ( 2.1) Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz (Haswell, bare metal) 2 nodes * 18 cores * 2 threads = 72 CPUs 128G/node = 256G memory kernel boot deferred init ------------------------ ------------------------ node% (thr) speedup time_ms (stdev) speedup time_ms (stdev) ( 0) -- 1680.0 ( 4.6) -- 627.0 ( 4.0) 3% ( 1) 0.3% 1675.7 ( 4.5) -0.2% 628.0 ( 3.6) 11% ( 4) 25.6% 1250.7 ( 2.1) 67.9% 201.0 ( 0.0) 25% ( 9) 30.7% 1164.0 ( 17.3) 81.8% 114.3 ( 17.7) 36% ( 13) 31.4% 1152.7 ( 10.8) 84.0% 100.3 ( 17.9) 50% ( 18) 31.5% 1150.7 ( 9.3) 83.9% 101.0 ( 14.1) 75% ( 27) 31.7% 1148.0 ( 5.6) 84.5% 97.3 ( 6.4) 100% ( 36) 32.0% 1142.3 ( 4.0) 85.6% 90.0 ( 1.0) AMD EPYC 7551 32-Core Processor (Zen, kvm guest) 1 node * 8 cores * 2 threads = 16 CPUs 64G/node = 64G memory kernel boot deferred init ------------------------ ------------------------ node% (thr) speedup time_ms (stdev) speedup time_ms (stdev) ( 0) -- 1029.3 ( 25.1) -- 240.7 ( 1.5) 6% ( 1) -0.6% 1036.0 ( 7.8) -2.2% 246.0 ( 0.0) 12% ( 2) 11.8% 907.7 ( 8.6) 44.7% 133.0 ( 1.0) 25% ( 4) 13.9% 886.0 ( 10.6) 62.6% 90.0 ( 6.0) 38% ( 6) 17.8% 845.7 ( 14.2) 69.1% 74.3 ( 3.8) 50% ( 8) 16.8% 856.0 ( 22.1) 72.9% 65.3 ( 5.7) 75% ( 12) 15.4% 871.0 ( 29.2) 79.8% 48.7 ( 7.4) 100% ( 16) 21.0% 813.7 ( 21.0) 80.5% 47.0 ( 5.2) Server-oriented distros that enable deferred page init sometimes run in small VMs, and they still benefit even though the fraction of boot time saved is smaller: AMD EPYC 7551 32-Core Processor (Zen, kvm guest) 1 node * 2 cores * 2 threads = 4 CPUs 16G/node = 16G memory kernel boot deferred init ------------------------ ------------------------ node% (thr) speedup time_ms (stdev) speedup time_ms (stdev) ( 0) -- 716.0 ( 14.0) -- 49.7 ( 0.6) 25% ( 1) 1.8% 703.0 ( 5.3) -4.0% 51.7 ( 0.6) 50% ( 2) 1.6% 704.7 ( 1.2) 43.0% 28.3 ( 0.6) 75% ( 3) 2.7% 696.7 ( 13.1) 49.7% 25.0 ( 0.0) 100% ( 4) 4.1% 687.0 ( 10.4) 55.7% 22.0 ( 0.0) Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz (Haswell, kvm guest) 1 node * 2 cores * 2 threads = 4 CPUs 14G/node = 14G memory kernel boot deferred init ------------------------ ------------------------ node% (thr) speedup time_ms (stdev) speedup time_ms (stdev) ( 0) -- 787.7 ( 6.4) -- 122.3 ( 0.6) 25% ( 1) 0.2% 786.3 ( 10.8) -2.5% 125.3 ( 2.1) 50% ( 2) 5.9% 741.0 ( 13.9) 37.6% 76.3 ( 19.7) 75% ( 3) 8.3% 722.0 ( 19.0) 49.9% 61.3 ( 3.2) 100% ( 4) 9.3% 714.7 ( 9.5) 56.4% 53.3 ( 1.5) Future Work This post described page init, the first user of padata's support for multithreaded jobs. All future users will need to be aware of various resource controls, such as cgroup's CPU and cpuset controllers, sched_setaffinity, and NUMA memory policy. There are also some draft patches written that will be part of the next phase, such as ones to run helpers at the highest nice level on the system to avoid disturbing other tasks. The plan for the immediate future is to get the CPU controller ready to throttle kernel threads.

Oracle Linux kernel developer Daniel Jordan contributes this post on the initial support for multithreaded jobs in padata.     The last padata blog described unbinding padata jobs from specific...

Linux

Share your experience! Review Oracle Linux on TrustRadius

Today, Oracle is announcing a partnership with TrustRadius to gather feedback from real-life Oracle Linux users. TrustRadius is one of the most trusted review sites for business technology. Optimized for content quality and data integrity, they help buyers make better product decisions based on unbiased and insightful reviews. Customers choose Oracle Linux to improve security, reduce downtime, simplify operations, and save operating costs by switching from other operating environments. Each TrustRadius review is vetted for quality, depth, and detail by their research team. They do not sell your information to third parties, so you can submit  a review with confidence. Check out what your peers are saying in the links below: Holman Cárdenas, M.Eng, TOGAF®, ITIL® Information Technology Architect Ministry of Justice / Ministère de la Justice – Québec Government        It comes pre-tuned and optimized for Oracle databases out of the box. Very secure and stable. Easier to install and configure compared to other linux versions.The experience we had with the support was very positive (although we almost never had to call for support, since the system is pretty stable). Read the full review Jose de la Cruz Malena CIO (Chief Information Officer) Cooperativa Vega Real Financial Services         The positive impact of implementing Oracle Linux is that it has reduced our costs of licences by 60% With one Linux Server, we consolidated 3 Windows Servers, giving us more memory available and the best use of processors and less storage needed for the same tasks. Read the full review Please take a few minutes to share your experience with your peers.  And don’t forget to look at what your peers are saying about the technologies you are interested in.  

Today, Oracle is announcing a partnership with TrustRadius to gather feedback from real-life Oracle Linux users. TrustRadius is one of the most trusted review sites for business technology....

Linux

Oracle Linux 8: Administration made easy with free videos

Blog created by Craig McBride Training Tuesday Edition - II Now that you’ve had a chance to learn about Oracle Linux 8 installation – you did check out the prior blog – right? You’ll want to continue learning Oracle Linux 8 by delving into the next set of free, short videos on some common administration tasks that you can perform on Oracle Linux 8. These videos are applicable for deployment via on-premises systems or Oracle Cloud Infrastructure instances. You can learn step-by-step how to: configure the system date and time automate tasks dynamically load and unload kernel modules configure users and groups configure networking You can also explore the proc and sysfs file systems to view and configure system hardware and system processes. Here’s the list of videos and the time it takes for you to complete each one: video System Configuration Date and Time (7 Min) video System Configuration Proc File System (6 Min) video System Configuration Sysfs File System (7 Min) video Oracle Linux 8 Automating Tasks Cron Utility (7 Min) video Oracle Linux 8 Automating Tasks Anacron, At, and Batch Utilities (6 Min) video Oracle Linux 8 Kernel Module Configuration (7 Min) video Oracle Linux 8 Users and Groups (12 Min) video Network Configuration Files on Oracle Linux 8 (7 Min) video Using NetworkManager CLI (nmcli) on Oracle Linux 8 (7 Min) video Using the ip command on Oracle Linux 8 (9 Min) Be sure to come back for our next edition, which will cover package management classes.  New videos are added on an ongoing basis so check back often. Resources: Oracle Linux Oracle Linux 8 training videos Oracle Linux 8 product documentation Visit Training Tuesday Edition - I - Oracle Linux 8 installation made easy with free videos

Blog created by Craig McBride Training Tuesday Edition - II Now that you’ve had a chance to learn about Oracle Linux 8 installation – you did check out the prior blog – right? You’ll want to continue...

Oracle Linux 8 - Installation made easy with free videos

Training Tuesday Edition - I Blog written by Craig McBride With “work from home” mandates and less opportunity to go to in-person classes, you might be looking for training opportunities you can start on today. We all need some help to get started on developing our skills. To make it easy for you, we’ve put together a series of blogs where you’ll find free, short videos that you can take at your own pace to get a better at understanding of Oracle Linux 8. You can develop skills to use and administer Oracle Linux 8 on Oracle Cloud Infrastructure, on-premises, or in hybrid environments. This first blog focuses on the installation and boot process. You can learn step-by-step how to complete an Oracle Linux 8 installation for on-premises deployment and how to create an Oracle Linux 8 instance on Oracle Cloud Infrastructure. You can also learn about the boot process and how to configure different services to start at boot time. Here’s the list of videos and the time it takes for you to complete each one. In less than an hour, you can complete installation training: video Installing Oracle Linux 8 duration (8 Min) video Install Oracle Linux 8 on Oracle Cloud Infrastructure duration (4 Min) video BIOS Firmware Bootloader Process on Oracle Linux 8 duration (7 Min) video GRUB 2 on Oracle Linux 8 duration (10 Min) video Unified Extensible Firmware Interface on Oracle Linux 8 duration (8 Min) video systemd System and Service Manager on Oracle Linux 8 duration (9 Min) video systemd Target Units on Oracle Linux 8 duration (7 Min) Be sure to come back for our next edition, which will cover administration classes. New videos are added on an ongoing basis so check back often. Resources: Oracle Linux Oracle Linux 8 training videos Oracle Linux 8 product documentation

Training Tuesday Edition - I Blog written by Craig McBride With “work from home” mandates and less opportunity to go to in-person classes, you might be looking for training opportunities you can start...

Announcements

IRI Certifies Voracity with Oracle Linux

The Oracle Linux and Virtualization Alliance team welcomes IRI, The CoSort Company, and its Voracity data management platform to our ISV ecosystem. Voracity enables customers to marshal data without the cost or complexity of multiple tools. IRI has certified and supports Voracity on Oracle Linux 7 and 8. This can provide a rich set of performance and security features for Oracle DBAs, big data architects, and data privacy teams. IRI Voracity combines data discovery, integration, migration, governance, and analytics in a managed metadata framework built on Eclipse. It leverages the proven power of IRI CoSort or Hadoop MR2, Spark, Spark Stream, Storm, and Tez. IRI Voracity runs on Oracle Cloud Infrastructure, enabling modern PaaS and SaaS options for SMB and enterprise customers seeking faster, more affordable, and highly secure cloud execution of ETL jobs, plus data masking and synthesis, data quality and migration, and data wrangling for analytics. On Oracle Cloud Infrastructure or on premises, customers can use IRI Voracity to perform, speed, and combine critical lifecycle activities including: Data Discovery - classifying, diagramming, profiling, and searching of structured, semi-structured, and unstructured data sources Data Integration - individually optimized, task-consolidated same-pass E, T, and L operations, plus CDC, slowly changing dimensions, and ways to speed or leave any legacy ETL platform Data Migration - and conversion of data types, file formats, and database platforms, plus incremental or bulk data replication and federation Data Governance - PII data masking and re-ID risk scoring, DB subsetting, synthetic test data generation, data validation, cleansing, and enrichment, master and metadata management, etc. Analytics - embedded reporting, integrations with KNIME and cloud analytic platforms, and data wrangling to speed time-to-display in BI tools  Visit oracle.com/linux and www.iri.com for more information.  

The Oracle Linux and Virtualization Alliance team welcomes IRI, The CoSort Company, and its Voracity data management platform to our ISV ecosystem. Voracity enables customers to marshal data without...

Announcements

Unbreakable Linux Network (ULN) IP address changing on October 30, 2020

Unbreakable Linux Network (ULN) will be undergoing planned maintenance beginning on October 30th 2020 starting at 6pm Pacific time. This planned maintenance event is scheduled to be completed by 10pm Pacific time on the same date. During this planned maintenance event, the content delivery component of the Unbreakable Linux Network will move to a new IP address. Servers that need to download content from ULN that reside behind a proxy or firewall that limits outbound connectivity based on destination IP address will be blocked by that proxy or firewall when attempting to connect. This includes: servers that are directly registered to ULN servers configured to use uln-yum-mirror to synchronise content from ULN Spacewalk Server instances that synchronise content from ULN Oracle Enterprise Manager instances that synchronise content from ULN Servers that are configured as downstream clients of a uln-yum-mirror instance or who are registered to a local Spacewalk instance that do not require traversal of the restrictive proxy or firewall are not affected. Prior to October 30, 2020 customers must modify outbound proxy or firewall rules to allow outbound SSL/TLS connections on port 443 to communicate with linux-update.oracle.com using the destination IP address of 138.1.51.46. For more information, please see My Oracle Support Doc ID. 2720318.1.

Unbreakable Linux Network (ULN) will be undergoing planned maintenance beginning on October 30th 2020 starting at 6pm Pacific time. This planned maintenance event is scheduled to be completed by 10pm...

Linux Kernel Development

Check out the Oracle talks at KVM Forum 2020

The annual KVM forum conference is next week. It brings together the world's leading experts on Linux virtualization technology to present their latest work. The conference is virtual this year, with live attendance from October 28-30, or check out the recordings once they are available! https://events.linuxfoundation.org/kvm-forum. We have a good number of engineers from the Oracle Linux kernel development team who will be presenting their work at the forum.  Alexandre Chartre presents KVM Address Space Isolation, a kernel enhancement that provides a separate kernel address space for KVM when running virtual machines. This provides an extra level of protection against speculative execution exploits, improving security for all, and also was a hot topic at the Linux Plumbers Conference earlier this year. Ankur Arora tells us how to optimize lock operations in a virtualized kernel, while being able to modify the optimization if conditions on the host change, such as after a live migration. See his talk on Changing Paravirt Lock-ops for a Changing World. Annie Li talks about Implementing SR-IOV Failover for Windows Guests During Migration, which builds on the failover operation defined by the virtio specification, and enables live migration for Windows clients. Steve Sistare presents enhancements to QEMU and the Linux kernel that allows the QEMU management process to be updated to the latest version while keeping the guest alive. This enables critical bug fixes, security mitigations, and new features, without rebooting the guest. See QEMU Live Update Joao Martins guides us Towards an Alternative Memory Architecture. Memory assigned to guests is still tracked by page structs in the host kernel, which is wasteful. With modifications to the DAX sub-system, guest memory can instead be backed by DAX segments, eliminating this overhead. This is cool and useful stuff, check it out!

The annual KVM forum conference is next week. It brings together the world's leading experts on Linux virtualization technology to present their latest work. The conference is virtual this year, with...

Linux

Vinchin Backup & Recovery is now tested and supported with Oracle Linux Virtualization Manager

Oracle is pleased to announce that Vinchin, a provider of data protection solutions for enterprises, has tested and will support customers running its Backup & Recovery solution with Oracle Linux KVM and Oracle Linux Virtualization Manager. This means that you can easily and efficiently backup and restore virtual machines running on Oracle Linux Virtualization Manager with Vinchin Backup & Recovery. Vinchin offers a modern and secure IT infrastructure solution that delivers high availability and scalability to drive transformative business outcomes for customers. Oracle Linux Virtualization Manager is a server virtualization management platform based on the oVirt open-source project. It can be easily deployed to configure, monitor, and manage an Oracle Linux Kernel-based Virtual Machine (KVM) environment with support from Oracle. Vinchin has provided its oVirt-based backup solution for several years and has customers throughout China, Europe and the Americas. Vinchin now supports its reliable backup and disaster recovery solution for customers running Oracle Linux KVM and Oracle Linux Virtualization Manager. Last but not least, teaming with the Oracle Linux alliance group and Vinchin’s work to verify compatibility with Oracle Linux Virtualization Manager has given Vinchin confidence and built trust in this collaboration, which may result in creating solutions for other Oracle products. Watch the company’s respective blogs for future updates. Visit us at oracle.com/linux and stay connected:  twitter.com/oraclelinux facebook.com/oraclelinux blogs.oracle.com/linux youtube.com/oraclelinuxchannel vinchin.com/en/ vinchin.com/en/product/vm-backup-and-recovery.html

Oracle is pleased to announce that Vinchin, a provider of data protection solutions for enterprises, has tested and will support customers running its Backup & Recovery solution with Oracle Linux KVM...

Announcements

Announcing the release of Oracle Linux 7 Update 9

Oracle is pleased to announce the general availability of Oracle Linux 7 Update 9, which includes Unbreakable Enterprise Kernel (UEK) Release 6 as the default kernel. Oracle Linux brings the latest open source innovations and business-critical performance and security optimizations for cloud and on-premises deployment. Oracle Linux maintains user space compatibility with Red Hat Enterprise Linux (RHEL), which is independent of the kernel version that underlies the operating system. Existing applications in user space will continue to run unmodified on Oracle Linux 7 Update 9 with UEK release 6 and no re-certifications are needed for applications already certified with Red Hat Enterprise Linux 7 or Oracle Linux 7. Oracle Linux 7 Update 9 is available on 64-bit Arm (aarch64) and 64-bit AMD/Intel (x86-64) based systems. Oracle Linux 7 Update 9 ships with the following kernel packages, which include bug fixes, security fixes, and enhancements: UEK Release 6 (kernel-uek-5.4.17-2011.6.2.el7uek) for x86-64 and aarch64 Red Hat Compatible Kernel (RHCK) (kernel-3.10.0-1136.el7) for x86-64 only Notable new features New features and changes for Red Hat Compatible Kernel (RHCK) EDAC driver for Intel ICX systems added: The Error Detection and Correction (EDAC) driver has been added to Intel ICX systems in this release. This driver enables error detection on these systems, as well as reports any errors to the EDAC subsystem. Mellanox ConnectX-6 Dx network adapter support added: Oracle Linux 7 Update 9 adds the PCI IDs of the Mellanox ConnectX-6 Dx network adapter to the mlx5_core driver. UEK Release 6 is based on the mainline Linux kernel 5.4, supplying more innovation than other commercial Linux kernels.  Arm: Enhanced support for the Arm (aarch64) platform, including improvements in the areas of security and virtualization. Cgroup v2: UEK R6 includes all Cgroup v2 features, along with several enhancements. ktask: ktask is a framework for parallelizing CPU-intensive work in the kernel. It can be used to speed up large tasks on systems with available CPU power, where a task is single-threaded in user space. Parallelized kswapd: Page replacement is handled in the kernel asynchronously by kswapd, and synchronously by direct reclaim. When free pages within the zone free list are low, kswapd scans pages to determine if there are unused pages that can be evicted to free up space for new pages. This optimization improves performance by avoiding direct reclaims, which can be resource intensive and time consuming. Kexec firmware signing: The option to check and validate a kernel image signature is enabled in UEK R6. When kexec is used to load a kernel from within UEK R6, kernel image signature checking and validation can be implemented to ensure that a system only loads a signed and validate kernel image. Memory management: Several performance enhancements have been implemented in the kernel's memory management code to improve the efficiency of clearing pages and cache, as well as enhancements to fault management and reporting. NVDIMM: NVDIMM feature updates have been implemented so that persistent memory can be used as traditional RAM. NVMe improvements:  NVMe over Fabrics TCP host and the target drivers have been added. Multipath support and passthrough command support have been added. NVMe namespace support is extended to include Namespace Write Protect and Asynchronous Namespace Access. DTrace: DTrace support is enabled and has been re-implemented to use the Berkeley Packet Filter (BPF) that is integrated into the Linux kernel. OCFS2: Support for the OCFS2 file system is enabled. Btrfs: Support for the Btrfs file system is enabled and support to select Btrfs as a file system type when formatting devices is available. NFS: enhancements and new features that help on NFS performance. Zero copy networking: network performance enhancements and new technology to build faster networking products. New features and changes are independent of the kernels DIF/DIX (T10 P1) support for specific hardware: SCSI T10 DIF/DIX is fully supported on hardware that has been qualified by the vendor, provided that the vendor also fully supports the particular host bus adapter (HBA) and storage array configuration. FreeRDP updated to version 2.1.1: The FreeRDP feature for the Remote Desktop Protocol (RDP) is updated from version 2.0.0 to version 2.1.1 in this release. This version of FreeRDP includes new RDP options for the current Microsoft Windows terminal server version. Several security issues are also fixed in FreeRDP 2.1.1. Pacemaker updated to version 1.1.23: The Pacemaker cluster resource manager is updated in this release to version 1.1.23. This version of Pacemaker provides numerous bug fixes over the previous version. Further information is available in the Release Notes for Oracle Linux 7 Update 9. Oracle Linux downloads Individual RPM packages are available on the Unbreakable Linux Network (ULN) and the Oracle Linux yum server. ISO installation images are available for download from the Oracle Linux yum server and container images are available via Oracle Container Registry, GitHub Container Registry and Docker Hub. Oracle Linux can be downloaded, used, and distributed free of charge and all updates and errata are freely available. Customers decide which of their systems require a support subscription. This makes Oracle Linux an ideal choice for development, testing, and production systems. The customer decides which support coverage is best for each individual system while keeping all systems up to date and secure. Customers with Oracle Linux Premier Support also receive support for additional Linux programs, including Gluster Storage, Oracle Linux Software Collections, and zero-downtime updates using Oracle Ksplice. For more information about Oracle Linux, please visit www.oracle.com/linux.

Oracle is pleased to announce the general availability of Oracle Linux 7 Update 9, which includes Unbreakable Enterprise Kernel (UEK) Release 6 as the default kernel. Oracle Linux brings the latest...

Oracle Linux sessions at Open Source Summit Europe 2020

Open Source Summit connects the open source ecosystem under one roof. It covers cornerstone open source technologies; helps ecosystem leaders to navigate open source transformation; and delves into the newest technologies and latest trends touching open source. It is an extraordinary opportunity for cross-pollination between the developers, sysadmins, DevOps professionals, IT architects, and business & community leaders driving the future of technology. Check out the Oracle Linux sessions at this event and register today: Tuesday, October 27 13:00 GMT DTrace: Leveraging the Power of BPF - Kris Van Hees, Oracle Corp.   BPF and the overall tracing infrastructure in the kernel has improved tremendously and provides a powerful framework for tracing tools. DTrace is a well known and versatile tracing tool that is being re-implemented to make use of BPF and kernel tracing facilities. The goal of this open source project (hosted on github) is to provide a full-featured implementation of DTrace, leveraging the power of BPF to provide well known functionality. The presentation will provide an update on the progress of the re-implementation project of DTrace. Kris will share some of the lessons learnt along the way, highlighting how BPF provides the building blocks to implement a complex tracing tool. He will provide examples of creative techniques that showcase the power of BPF as an execution engine. Like any project, the re-implementation of DTrace has not been without some pitfalls, and Kris will highlight some of the limitations and unsolved problems the development team has encountered. Wednesday, October 28 13:00 GMT The Compact C Type (CTF) Debugging Format in the GNU Toolchain: Progress Report - Elena Zannoni & Nicholas Alcock, Oracle The Compact C Type Format (CTF) is a reduced form of debug information describing the type of C entities such as structures, unions, etc. It has been ported to Linux (from Solaris) and used to reduce the size of the debugging information for the Linux kernel and DTrace. It was extended to remove limits and add support for additional parts of the C type system. Last year, we integrated it into GCC and GNU binutils and added support for dumping CTF data in ELF objects and some support for linking CTF data into a final executable (and presented at this conference). This linking support was preliminary: it was slow and the CTF was large. Since last year, the libctf library and ld in binutils have gained the ability to properly deduplicate CTF with little performance hit: output CTF in linked ELF objects is now often smaller than the CTF in any input .o file. The libctf API has also improved, with support for new features, better error reporting, and a much-improved CTF iterator. This talk will provide an overview of CTF, the novel type deduplication algorithm used to reduce CTF size and discuss the other contributions of CTF to the toolchain, such as compiler and debugger support. 18:30 GMT KVM Address Space Isolation - Alexandre Chartre, Oracle First investigations about Kernel Address Space Isolation (ASI) were presented at Linux Plumber and KVM Forum last year. Kernel Address Space Isolation aims to mitigate some cpu hyper-threading data leaks possible with speculative execution attacks (like L1 Terminal Fault (L1TF) and Microarchitectural Data Sampling (MDS)). In particular, Kernel Address Space Isolation will provide a separate kernel address space for KVM when running virtual machines, in order to protect against a malicious guest VM attacking the host kernel using speculative execution attacks. Several RFCs for implementing this solution have been submitted. This presentation will describe the current state of the Kernel Address Space Isolation proposal with focusing on its usage with KVM, in particular the page table mapping requirements and the performance impact. Thursday, October 29 16:00 GMT Changing Paravirt Lock-ops for a Changing World - Ankur Arora, Oracle Paravirt ops are set in stone once a guest has booted. As an example we might expose `KVM_HINTS_REALTIME` to a guest and this hint is expected to stay true for the lifetime of the guest. However, events in a guest's life, like changed host conditions or migration might mean that it would be more optimal to revoke this hint. This talk discusses two aspects of this revocation: one, support for revocable `KVM_HINTS_REALTIME` and, second, work done in the paravirt ops subsystem to dynamically modify spinlock-ops.   Friday, October 30 14:00 GMT QEMU Live Update - Steven J. Sistare, Oracle The ability to update software with critical bug fixes and security mitigations while minimizing downtime is valued highly by customers and providers. In this talk, Steve presents a new method for updating a running instance of QEMU to a new version while minimizing the impact on the VM guest. The guest pauses briefly, for less than 200 msec in the prototype, without loss of internal state or external connections. The old QEMU process exec's the new QEMU binary, and preserves anonymous guest RAM at the same virtual address via a proposed Linux madvise variant. Descriptors for external connections are preserved, and VFIO pass through devices are supported by preserving the VFIO device descriptors and attaching them to a new KVM instance after exec. The update method requires code changes to QEMU, but no changes are required in system libraries or the KVM kernel module.  

Open Source Summit connects the open source ecosystem under one roof. It covers cornerstone open source technologies; helps ecosystem leaders to navigate open source transformation; and delves into...

Oracle Cloud Infrastructure

Creating an SSH Key Pair on the Linux Command Line for OCI Access

Introduction SSH is the standard on live command-line based access to Linux systems. Oracle Linux Tips and Tricks: Using SSH  is a good initial read. While an Oracle Cloud Infrastructure (OCI) instance is being created, a public SSH key is needed to be provided in the web interface to provide password-less SSH access to the new instance. The question is "How to produce the public SSH key needed?". This post aims to help the reader to achieve that objective on a Linux command-line. On Linux command line, the ssh-keygen command is used to generate the necessary public key. Starting Up Open a terminal in your Linux desktop GUI and make sure that you are logged on the user account (e.g. my_user - avoid using root account for general security reasons) that you would use to access the new Oracle Cloud Infrastructure instance via SSH Run ssh-keygen: $ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/my_user/.ssh/id_rsa): Give a name to your key pair to be generated (e.g. my_ssh_key) Enter file in which to save the key (/home/my_user/.ssh/id_rsa): my_ssh_key Enter passphrase (empty for no passphrase): Do not provide any passphrase and skip with enter. Enter same passphrase again: Your identification has been saved in my_ssh_key. Your public key has been saved in my_ssh_key.pub. The key fingerprint is: SHA256:tXpJNaug8iUdIEVCM+7WHX8gqS/AfRi//tUKanA1Eo8 my_user@my_desktop The key's randomart image is: +---[RSA 2048]----+ |   .=.o          | |   . =  ..       | |    o o ++o o    | |   o + BE=++ o   | |    = = So+.o    | |   . ..=.* + .   | |    . +o* = . .  | |     o =.o o .   | |      ..o.. .    | +----[SHA256]-----+ The file my_ssh_key.pub would have been created in your home directory. $ cat my_ssh_key.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkDBM0WOv+AzboCPaqhr8cAN/G HBoclnR+Gvo9x4JZA9gPYQIhCgGet4E8YgcWLwa0tDrZJvg/DuVMfQ0oA2JiaWHN W54lrfuACJVdF/8wZGKpgK5vnd7/pcAIZ9r6rdeaDyFSMEscNwX3pjEnkMp92ykQ tO4rmxnHtqefsvh+O4i4DT4EQE0bUanLriYs59K1XMkA2bIUvnjjD7ILKyNqVeYK hu5w/iS72+9l0U6nfifbyzy4VbqtOI1uU8bvdqeL7J6okTQjeJl/fW2tha//pNbm /nTVyLOOdYXxmAZ8zXX7r6X4pZE5lmbmowk3AZTojlI7MTrYOKuQcxsusUJ my_u ser@my_desktop Providing Key Information to the Oracle Cloud Infrastructure Instance While creating the Oracle Cloud Infrastructure instance, in the "Add SSH Keys" section, choose "PASTE PUBLIC KEYS" and copy/paste the contents of the public key file (alternatively you ca upload the file too) After the instance is created, use ssh command with the private key to access it (where <ip_addr> is the IP address of the new Oracle Cloud Infrastructure instance: $ ssh -i my_ssh_key opc@<ip_addr>      The authenticity of host '<ip_addr>(<ip_addr>)' can't be established.      ECDSA key fingerprint is SHA256:qD2zZE5hO0TYYEMQdDpSPz5izTuaFslwZiMOZp7kwDc.      ECDSA key fingerprint is MD5:ea:c3:e8:61:e9:29:7a:df:ae:b6:43:ad:5b:71:f7:90.      Are you sure you want to continue connecting (yes/no)? yes      Warning: Permanently added '<ip_addr>' (ECDSA) to the list of known hosts. [opc@<ip_addr> ~]$ Summary To be able to access an Oracle Cloud Infrastructure instance via ssh on a Linux desktop, one can use the ssh-keygen command to generate the necessary SSH key pair and add relevant information on the Oracle Cloud Infrastructure instance as described.

Introduction SSH is the standard on live command-line based access to Linux systems. Oracle Linux Tips and Tricks: Using SSH  is a good initial read. While an Oracle Cloud Infrastructure (OCI) instance...

Announcements

Announcing updated Oracle Linux Templates for Oracle Linux KVM

Oracle is pleased to announce updated Oracle Linux Templates for Oracle Linux KVM and Oracle Linux Virtualization Manager. Oracle Linux Templates for Oracle Linux KVM provide an innovative approach to deploying a fully configured software stack by offering pre-installed and pre-configured software images. Use of Oracle Linux Templates eliminates the installation and configuration costs, and reduces the ongoing maintenance costs helping organizations achieve faster time to market and lower cost of operations. New templates include: Oracle Linux 7 Update 8 Template Unbreakable Enterprise Kernel 5 Update 4 - kernel-uek-4.14.35-2025.400.8 8GB of RAM 37GB of OS Virtual-Disk Oracle Linux 8 Update 2 Template Unbreakable Enterprise Kernel 6 - kernel-uek-5.4.17-2011.4.4 8GB of RAM 37GB of OS Virtual-Disk New Oracle Linux Templates for Oracle Linux KVM and Oracle Linux Virtualization Manager supply powerful automation. These templates are built on cloud-init, the same technology used today on Oracle Cloud Infrastructure and includes improvements and regression fixes. Downloading Oracle Linux Templates for Oracle Linux KVM Oracle Linux Templates for Oracle Linux KVM are available on yum.oracle.com website on "Oracle Linux Virtual Machine" Download section. Further information The Oracle Linux 7 Template for Oracle Linux KVM allows you to configure different options on the first boot for your Virtual Machine; cloud-init options configured on the Oracle Linux 7 Template are: VM Hostname define the Virtual Machine hostname Configure Timezone define the Virtual Machine timezone (within an existing available list) Authentication Username define a custom Linux user on the Virtual Machine Password Verify Password define the password for the custom Linux user on the Virtual Machine SSH Authorized Keys SSH authorized keys to get password-less access to the Virtual Machine Regenerate SSH Keys Option to regenerate the Virtual Machine Host SSH Keys Networks DNS Servers define the Domain Name Servers for the Virtual Machine DNS Search Domains define the Domain Name Servers Search Domain for the Virtual Machine In-guest Network Interface Name define the virtual-NIC device name for the Virtual Machine (ex. eth0) Custom script Execute a custom-script at the end of the cloud-init configuration process These options can be easily managed by the "Oracle Linux Virtualization Manager" web interface by editing the Virtual Machine and enabling the "Cloud-Init/Sysprep" option: Further details on how to import and use the Oracle Linux 7 Template for Oracle Linux KVM are available in this technical article on Simon Coter's Oracle Blog. Oracle Linux KVM & Virtualization Manager Support Support for Oracle Linux Virtualization Manager is available to customers with an Oracle Linux Premier Support subscription. Refer to the Oracle Unbreakable Linux Network for additional resources on Oracle Linux support. Oracle Linux Virtualization Manager Resources Oracle Linux Resources Oracle Virtualization Resources Oracle Linux yum server Oracle Linux Virtualization Manager Training

Oracle is pleased to announce updated Oracle Linux Templates for Oracle Linux KVM and Oracle Linux Virtualization Manager. Oracle Linux Templates for Oracle Linux KVM provide an innovative approach to...

Announcements

Announcing the release of Oracle Linux 7 Update 9 Beta

Oracle is pleased to announce the availability of the Oracle Linux 7 Update 9 Beta Release for the 64-bit Intel and AMD (x86_64) and 64-bit Arm (aarch64) platforms. Oracle Linux 7 Update 9 Beta is an update release that includes bug fixes, security fixes, and enhancements. The beta release allows Oracle partners and customers to test these capabilities before Oracle Linux 7 Update 9 becomes generally available.  It is 100% application binary compatible with Red Hat Enterprise Linux 7 Update 9 Beta. Updates include: An improved SCAP security guide for Oracle Linux 7 Updated device drivers for both UEK as well as Red Hat Compatible Kernel Wayland display server protocol is now available as a technology preview Updated virt-v2v release that now support Ubuntu and Debian conversion from VMware to Oracle Linux KVM The Oracle Linux 7 Update 9 Beta Release includes the following kernel packages: kernel-uek-5.4.17-2011.4.4 for x86_64 and aarch64 platforms - The Unbreakable Enterprise Kernel Release 6, which is the default kernel. kernel-3.10.0-1136 for x86_64 platform - The latest Red Hat Compatible Kernel (RHCK). To get started with Oracle Linux 7 Update 9 Beta Release, you can simply perform a fresh installation by using the ISO images available for download from Oracle Technology Network. Or, you can perform an upgrade from an existing Oracle Linux 7 installation by using the Beta channels for Oracle Linux 7 Update 9 Beta on the Oracle Linux yum server or the Unbreakable Linux Network (ULN).  # vi /etc/yum.repos.d/oracle-linux-ol7.repo [ol7_beta] name=Oracle Linux $releasever Update 9 Beta ($basearch) baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/beta/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1 [ol7_optional_beta] name=Oracle Linux $releasever Update 9 Beta ($basearch) Optional baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/optional/beta/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1 If your instance is running on Oracle Cloud Infrastructure (OCI), the value "$ociregion" will be automatically valued to use OCI yum mirrors. Modify the yum channel setting and enable the Oracle Linux 7 Update 9 Beta channels. You can then perform the upgrade. # yum update After the upgrade is completed, reboot the system and you will have Oracle Linux 7 Update 9 Beta running. [root@v2v-app: ~]# cat /etc/oracle-release Oracle Linux Server release 7.9 This release is provided for development and test purposes only and is not covered by Oracle Linux support; Beta releases cannot be used in production and no support will be provided to any customers running beta in production environments Further technical details and known issues for Oracle Linux 7 Update 9 Beta Release are available on Oracle Community - Oracle Linux and UEK Preview space. Oracle Linux team welcome your questions and feedback on Oracle Linux 7 Update 9 Beta Release. You may contact the Oracle Linux team at oraclelinux-info_ww_grp@oracle.com or post your questions and comments on the Oracle Linux and UEK Preview Space on the Oracle Community.

Oracle is pleased to announce the availability of the Oracle Linux 7 Update 9 Beta Release for the 64-bit Intel and AMD (x86_64) and 64-bit Arm (aarch64) platforms. Oracle Linux 7 Update 9 Beta is an...

Announcements

Announcing the release of Spacewalk 2.10 for Oracle Linux

Oracle is pleased to announce the release of Spacewalk 2.10 Server for Oracle Linux 7 along with updated Spacewalk 2.10 Client for Oracle Linux 7 and Oracle Linux 8. Client support is also provided for Oracle Linux 6 and Oracle Linux 5 (for extended support customers only). In addition to numerous fixes and other small enhancements, the Spacewalk 2.10 release includes the following significant features: Spacewalk can now sync and distribute Oracle Linux 8 content including support for mirroring a repository that contains module metadata. The module metadata can then be made available to downstream clients. Python 2 packages are no longer required on systems that have Python 3 as the default. It is now possible to manage errata severity via Spacewalk server The dwr package has been updated to version 3.0.2 to fix security vulnerabilities. Updated API calls: errata.create/setDetails: provides the capability for managing severities. system.schedulePackageRemoveByNevra: supports the removal of packages that are not in the database. For more details on this release, including additional new features and changes, please consult the Spacewalk 2.10 Release Notes. Limited support for Oracle Linux 8 clients Spacewalk 2.10 Server can mirror a repository that contains module and AppStream metadata and make that metadata available to downstream clients. This feature is sufficient to support an Oracle Linux 8 client when using the dnf tool.However, the Spacewalk 2.10 web interface and API are not AppStream or module aware and therefore has limited support for managing for Oracle Linux 8 clients. Please review section 1.4 of the Spacewalk 2.10 Release Notes for a comparison of the Spacewalk functionality that is available to each Oracle Linux client version.  

Oracle is pleased to announce the release of Spacewalk 2.10 Server for Oracle Linux 7 along with updated Spacewalk 2.10 Client for Oracle Linux 7 and Oracle Linux 8. Client support is also provided...

Announcements

Shoe Carnival Increases Security and Availability with Oracle Ksplice

In this article, we will discuss how Shoe Carnival increased their IT systems security and availability using Oracle Ksplice. Shoe Carnival, Inc. is one of the nation’s largest family footwear retailers, offering a broad assortment of moderately priced dress, casual and athletic footwear for men, women and children with emphasis on national name brands. The company operates 390 stores in 35 states and Puerto Rico, and offers online shopping. In keeping with the carnival spirit of rewarding surprises, Shoe Carnival offers their customers chances to win various coupons and discounts.  Customers can spontaneously win while spinning the carnival wheel in the store or redeeming an a promotional offer. These specials encourage customers to make a purchase. Customers are also eligible to earn loyalty rewards via a “Shoe Perks” membership. This loyalty program allows them to earn points with each purchase and receive exclusive offers. Members can redeem points and awards either when in store or shopping online. Shoe Carnival is focused on customer service and giving its clients a positive experience. To this end, its technology infrastructure plays a very important role in supporting  customer-facing operations. In each of its 395 stores, Shoe Carnival has 2 servers supporting the register systems.  These systems are critical for  helping to ensure business runs smoothly. A store clerk uses this system to look up a customer’s loyalty account, apply appropriate discounts,  and ultimately complete sales. When the system is down, it can impede Shoe Carnival’s ability to provide a high-quality customer customer experience.   Previously, Shoe Carnival was running its systems on Red Hat. They switched to Oracle Linux for several reasons including increased availability and security, improved support, and lower overall costs. Security is top of mind for retailers handing customer information. In particular, there are many compliance and regulatory mandates for handling a customer’s personal and financial payment information. To thwart and protect against cyber security threats, the Shoe Carnival IT team needs to regularly patch and update its Linux operating systems (OS) with the latest fixes. Oracle Ksplice allows them to do automated live patching without any downtime. Whereas before, it was a struggle to update all servers in a timely fashion and avoid service disruptions. Today, Ksplice has enabled Shoe Carnival to reduce planned downtime by more than 20%.  The automated features have also saved up to 35% of administrator time per system. Lastly, being a long standing Oracle Database and Oracle Exadata customer, Shoe Carnival found value in using the same support vendor for its OS.  Using Oracle Linux Premier Support has yielded a 50% faster support ticket resolution.   We are proud to help customers like Shoe Carnival increase IT systems security and availability, enabling it to deliver an improved customer experience.  Watch this video to learn more!  

In this article, we will discuss how Shoe Carnival increased their IT systems security and availability using Oracle Ksplice.Shoe Carnival, Inc. is one of the nation’s largest family...

Linux

Pella Optimizes IT Infrastructure and Reduces License Costs With Oracle Linux and Virtualization

In this article, we will discuss how Pella transformed their IT infrastructure with a newly virtualized environment. The Pella Corporation is a privately held window and door manufacturing company headquartered in Pella, Iowa.  They have manufacturing and sales operations in a number of locations in the United States. Pella Corporation employs more than 8,000 people  with 17 manufacturing sites and 200 showrooms throughout the United States and select regions of Canada. Pella’s continuous business growth has proved to be a big challenge for the IT department.  As the company’s needs increased, its older infrastructure, which was based on Unix physical servers, struggled to keep pace.  Pella needed a more flexible platform that would allow them to easily build out capacity and improve functionality. This provided a unique opportunity for the IT team. The team wanted a reliable infrastructure that could support both the current capacity, and easily expand to accommodate growth while keeping costs to a minimum. For these reasons, the IT team decided to move to a virtualized x86-server environment.    As a long time Oracle customer, Pella was already using Oracle applications and Oracle Database.  Therefore, Pella was inclined to  evaluate Oracle’s Virtualization and Linux solutions to facilitate their IT transformation.  Oracle Linux was an obvious choice for Pella primarily because it is optimized for existing Oracle workloads.  They also decided to virtualize their environment with Oracle VM mainly for the license structure advantages. With Oracle VM, Pella is able to pin CPUs to specific VMs, which in turn translated to saving on licensing costs for Oracle applications. Today, Pella’s IT departments uses Oracle Linux in 95% of their Linux environment and Oracle VM to run all of their Linux VMs. This combination has proven to be very advantageous for multiple reasons. First, Pella has significantly reduced their IT costs, including a savings of 75% on licensing costs by switching to a virtualized environment. It also saved nearly 5x on what would have been spent on purchasing physical hardware. Second, Pella saved on CPU utilization. In its previous Unix physical environment, the utilization was 50%, now it’s down to 5%.   Thirdly, Pella has simplified its operations and streamlined their support ticket process. Because they run a large number of Oracle workloads, the team has been able to use one portal to share tickets between the DBA, Linux, and applications teams.  Having a single vendor has improved their support experience and ensured their mission-critical applications are running at their best. With its new IT platform based on Oracle Linux and Oracle VM, Pella now has the ability to scale up and out as needed. It also has a reliable platform to support its manufacturing. We are proud to help customers like Pella transform their IT landscapes! Watch this video to learn more.  

In this article, we will discuss how Pella transformed their IT infrastructure with a newly virtualized environment. The Pella Corporation is a privately held window and door manufacturing company...

Linux

Getting Started With The Oracle Cloud Infrastructure Python SDK

In a recent blog post I illustrated how to use the OCI Command Line Interface (CLI) in shell scripts. While the OCI CLI is comprehensive and powerful, it may not be the best solution when you need to handle a lot of data in shell scripts. In such cases using a programming language such as Python and the Oracle Cloud Infrastructure Python SDK makes more sense. Data manipulation is much easier, and the API is —as expected— more complex. In an attempt to demystify the use of the OCI Python SDK, I have re-written and improved the sample oci-provision.sh shell script in Python. This sample project is named oci-compute and is published on GitHub. This blog post highlights the key concepts of the OCI Python SDK, and together with the oci-compute sample code it should help you to get started easily. About oci-compute The oci-compute tool does everything oci-provision.sh does; better, faster and with some additional capabilities: List available Platform, Custom and Marketplace images Create Compute Instances from a Platform, Custom or Marketplace image A cloud-init file can be specified to run custom scripts during instance configuration List, start, stop and terminate Compute Instances Command line syntax and parameters naming are similar to the OCI CLI tool. See the project README for more information on usage and configuration. I am using this tool on a daily basis to easily manage OCI Compute instances from the command line. OCI Python SDK installation At the time of this writing, the SDK supports Python version 3.5 or 3.6 and can be easily installed using pip, preferably in a Python virtual environment. Installation and required dependencies are described in detail in the documentation. oci-compute installation The oci-compute utility is distributed as a Python package. The setup.py file lists the SDK as dependency; installing the tool will automatically pull the SDK if not already installed. See the README file for detailed installation steps, but in short it is as simple as creating a virtual environment and running: $ pip3 install . The package is split in two main parts: cli.py: handles the command line parsing using the Click package. It defines all the commands, sub-commands and their parameters; instantiate the OciCompute class and invoke its methods. oci_compute.py: defines the OciCompute class which interacts with the OCI SDK. This is the most interesting part of this project. OCI SDK Key concepts This section describes the key concepts used by the OCI SDK. Configuration The first step for using the OCI SDK is to create a configuration dictionary (Python dict). While you can build it manually, you will typically use the oci.config.from_file API call to load it from a configuration file. The default configuration file is ~/.oci/config. It is worth noticing that the OCI CLI uses the same configuration file and provides a command to create it: $ oci setup config For oci-compute, the configuration file is loaded during the class initialization: self._config = oci.config.from_file(config_file, profile) API Service Clients The OCI API is organized in Services, and for each Service you will have to instantiate a Service Client. For example, our oci-compute package uses the following Services: Compute Service (part of Core Services): to manage the Compute Services (provision and manage compute hosts). Virtual Network Service (part of Core Services): to manage the Networking Components (virtual cloud network, Subnet, …) Identity Service: to manage users, groups, compartments, and policies. Marketplace Service: to manage applications in Oracle Cloud Infrastructure Marketplace We instantiate the Service Clients in the class initialization: # Instantiate clients self._compute_client = oci.core.ComputeClient(self._config) self._identity_client = oci.identity.IdentityClient(self._config) self._virtual_network_client = oci.core.VirtualNetworkClient(self._config) self._marketplace_client = oci.marketplace.MarketplaceClient(self._config) Models Models allows you to create objects needed by the API calls. Example: to use an image from the Marketplace, we need to subscribe to the Application Catalog. This is done with the ComputeClient create_app_catalog_subscription method. This method needs an CreateAppCatalogSubscriptionDetails object as parameter. We will use the corresponding model to create such object: oci.core.models.CreateAppCatalogSubscriptionDetails. In oci-compute: app_catalog_subscription_detail = oci.core.models.CreateAppCatalogSubscriptionDetails( compartment_id=compartment_id, listing_id=app_catalog_listing_agreements.listing_id, listing_resource_version=app_catalog_listing_agreements.listing_resource_version, oracle_terms_of_use_link=app_catalog_listing_agreements.oracle_terms_of_use_link, eula_link=app_catalog_listing_agreements.eula_link, signature=app_catalog_listing_agreements.signature, time_retrieved=app_catalog_listing_agreements.time_retrieved ) self._compute_client.create_app_catalog_subscription(app_catalog_subscription_detail).data Pagination All list operations are paginated; that is: they will return a single page of data and you will need to call the method again to get additional pages. The pagination module allows you, amongst other, to retrieve all data in a single API call. Example: to list the available images in a compartment we could do: response = self._compute_client.list_images(compartment_id) which will only return the first page of data. To get get all images at once we will do instead: response = oci.pagination.list_call_get_all_results(self._compute_client.list_images, compartment_id) The first parameter to list_call_get_all_results is the paginated list method, subsequent parameters are the ones of the list method itself. Waiters and Composite operations To wait for an operation to complete (e.g.: wait until an instance is started), you can use the wait_until function. Alternatively, there are convenience classes in the SDK which will perform an action on a resource and wait for it to enter a particular state: the CompositeOperation classes. Example: start an instance and wait until it is started. The following code snippet shows how to start an instance and wait until it is up and running: compute_client_composite_operations = oci.core.ComputeClientCompositeOperations(self._compute_client) compute_client_composite_operations.instance_action_and_wait_for_state( instance_id=instance_id, action='START', wait_for_states=[oci.core.models.Instance.LIFECYCLE_STATE_RUNNING]) Error handling A complete list of exceptions raised by the SDK is available in the exception handling section of the documentation. In short, if your API calls are valid (correct parameters, …) the main exception you should care about is the ServiceError one which is raised when a service returns an error response; that is: a non-2xx HTTP status. For the sake of simplicity and clarity in the sample code, oci-compute does not capture most exceptions. Service Errors will result in a Python stack traceback. A simple piece of code where we have to consider the Service Error exception is illustrated here: for vnic_attachment in vnic_attachments: try: vnic = self._virtual_network_client.get_vnic(vnic_attachment.vnic_id).data except oci.exceptions.ServiceError: vnic = None if vnic and vnic.is_primary: break Putting it all together The oci-compute sample code should be self explanatory, but let’s walk through what happens when e.g. oci-compute provision platform --operating-system "Oracle Linux" --operating-system-version 7.8 --display-name ol78 is invoked. First of all, the CLI parser will instantiate an OciCompute object. This is done once at the top level, for any oci-compute command: ctx.obj['oci'] = OciCompute(config_file=config_file, profile=profile, verbose=verbose The OciCompute class initialization will: Load the OCI configuration from file Instantiate the Service Clients The Click package will then invoke provision_platform function which in turn will call the OciCompute.provision_platform method. We use the oci.core.ComputeClient.list_images to retrieve the most recent Platform Image matching the given Operating System and its version: images = self._compute_client.list_images( compartment_id, operating_system=operating_system, operating_system_version=operating_system_version, shape=shape, sort_by='TIMECREATED', sort_order='DESC').data if not images: self._echo_error("No image found") return None image = images[0] We then call OciCompute._provision_image for the actual provisioning. This method uses all of the key concepts explained earlier. Pagination is used to retrieve the Availability Domains using the Identity Client list_availability_domains method: availability_domains = oci.pagination.list_call_get_all_results( self._identity_client.list_availability_domains, compartment_id ).data VCN and subnet are retrieved using the Virtual Network Client (list_vcns and list_subnets methods) Metadata is populated with the SSH public key and a cloud-init file if provided: # Metadata with the ssh keys and the cloud-init file metadata = {} with open(ssh_authorized_keys_file) as ssh_authorized_keys: metadata['ssh_authorized_keys'] = ssh_authorized_keys.read() if cloud_init_file: metadata['user_data'] = oci.util.file_content_as_launch_instance_user_data(cloud_init_file) Models are used to create an instance launch details (oci.core.models.InstanceSourceViaImageDetails, oci.core.models.CreateVnicDetails and oci.core.models.LaunchInstanceDetails methods): instance_source_via_image_details = oci.core.models.InstanceSourceViaImageDetails(image_id=image.id) create_vnic_details = oci.core.models.CreateVnicDetails(subnet_id=subnet.id) launch_instance_details = oci.core.models.LaunchInstanceDetails( display_name=display_name, compartment_id=compartment_id, availability_domain=availability_domain.name, shape=shape, metadata=metadata, source_details=instance_source_via_image_details, create_vnic_details=create_vnic_details) Last step is to use the launch_instance_and_wait_for_state Composite Operation to actually provision the instance and wait until it is available: compute_client_composite_operations = oci.core.ComputeClientCompositeOperations(self._compute_client) response = compute_client_composite_operations.launch_instance_and_wait_for_state( launch_instance_details, wait_for_states=[oci.core.models.Instance.LIFECYCLE_STATE_RUNNING], waiter_kwargs={'wait_callback': self._wait_callback}) We use the optional waiter callback to display a simple progress indicator oci-compute demo Short demo of the oci-compute tool: Conclusion In this post, I’ve shown how to use oci-compute to easily provision and manage your OCI Compute Instances from the command line as well as how to create your own Python scripts using the Oracle Cloud Infrastructure Python SDK.

In a recent blog post I illustrated how to use the OCI Command Line Interface (CLI) in shell scripts. While the OCI CLI is comprehensive and powerful, it may not be the best solution when you need to...

Announcements

Oracle Linux container images now available on GitHub Container Registry

Oracle is pleased to announce the availability of Oracle Linux container images on GitHub Container Registry as part of our ongoing commitment to cultivating, supporting, and promoting popular open source technologies that customers can confidently deploy in business-critical environments. GitHub has quickly become one of the world's leading software development platforms and is now Oracle's preferred repository for open source software. Oracle has made many open source projects available on GitHub to make it easy for developers to access the source for Oracle-contributed software. We also use GitHub repositories to work with engineers and developers at partner companies and in the open source community. We've been publishing the official Oracle Linux container images to the GitHub Container Registry since its public beta launch in September 2020. When GitHub added multi-arch support later in September, 2020, we started publishing both the amd64 and arm64v8 variants of our official images. Using the GitHub Container Registry There are two ways to use the Oracle Linux images published GitHub Container Registry. You can either pull the image or use it as the base image in a Dockerfile. For example, if you want to pull the oraclelinux:7-slim image from GitHub Container Registry, you can run: # docker pull ghcr.io/oracle/oraclelinux:7-slim or $ podman pull ghcr.io/oracle/oraclelinux:7-slim This will automatically pull the correct variant for your architecture type. Alternatively, you can reference the image directly from within a Dockerfile, e.g. FROM ghcr.io/oracle/oraclelinux:7-slim Finding the Oracle Linux container images on GitHub As part of our ongoing effort to provide as much content as possible to developers working with of Oracle Linux, we've been publishing the Oracle Linux official container image tarballs on GitHub since December 2014 with a complete change log to ensure developers are aware of any changes that may affect a downstream image. These tarballs are built by Oracle and are used to build the official images on Docker Hub, Oracle Container Registry and GitHub Container Registry. Customer Support Customers running Oracle Linux in production can benefit from Oracle support. Oracle offers Basic and premier support for Oracle Linux. Support subscription customers can get easy access to support via the My Oracle Support portal. Support for Oracle Linux container images is included with both Oracle Linux Basic and Premier support subscriptions. Community Support For Oracle Linux users without an Oracle Linux support subscription, the following resources are available: Opening an issue at https://github.com/oracle/container-images/issues. The Containers and Orchestration category in the Oracle Applications and Infrastructure Community. Resources In addition to the links in this article, please visit Oracle.com/Linux for more information or to chat with an Oracle Linux representative.

Oracle is pleased to announce the availability of Oracle Linux container images on GitHub Container Registry as part of our ongoing commitment to cultivating, supporting, and promoting popular open...

Partners

Noesis Solutions Certifies its Optimus Process Integration and Design Optimization Software with Oracle Linux

We are pleased to introduce Noesis Solutions’ Optimus into the ecosystem of ISV applications certified with Oracle Linux. Noesis recently certified its Optimus 2020.1 release with Oracle Linux 6 and 7. Optimus is an industry-leading process integration and design optimization (PIDO) software platform, bundling a powerful range of capabilities for engineering process integration, design space exploration, engineering optimization, and robustness and reliability. These PIDO technologies help direct engineering simulations toward design candidates that can outsmart competition while taking into account relevant design constraints - effectively implementing an objectives-driven engineering process. Optimus advanced workflow technologies offer the unique capability to intuitively automate engineering processes by capturing the related simulation workflow. These workflows free users from repetitive manual model changes, data processing, and performance evaluation tasks. Optimus simulation workflows can be executed in local environments or cloud infrastructures. Optimus also offers effective data mining technologies that help engineering teams to gain deeper insights and visualize the design space in a limited time window, to help them make informed decisions. Noesis Solutions is an engineering innovation company that works with manufacturers in engineering-intense industries. Specialized in solutions that enable objectives driven draft-to-craft engineering processes, its software products and services help customers adopt a targeted development strategy that helps resolve their toughest multi-disciplinary engineering challenges.  

We are pleased to introduce Noesis Solutions’ Optimus into the ecosystem of ISV applications certified with Oracle Linux. Noesis recently certified its Optimus 2020.1 release with Oracle Linux 6 and 7. Op...

Linux Toolchain & Tracing

DTrace for the Application Developer - Counting Function Calls

This blog entry was provided by Ruud van der Pas   Introduction DTrace is often positioned as an operating system analysis tool for the system administrators, but it has a wider use than this. In particular the application developer may find some features useful when trying to understand a performance problem. In this article we show how DTrace can be used to print a list of the user-defined functions that are called by the target executable. We also show how often these functions are called. Our solution presented below works for a multithreaded application and the function call counts for each thread are given. Motivation There are several reasons why it may be helpful to know how often functions are called: Identify candidates for compiler-based inlining. With inlining, the function call is replaced by the source code of that function. This eliminates the overhead associated with calling a function and also provides additional opportunities for the compiler to better optimize the code. The downsides are an increase in the usage of registers and potentially a reduced benefit from an instruction cache. This is why inlining works best on small functions called very often. Test coverage. Although much more sophisticated tools exist for this, for example gcov, function call counts can be useful to quickly verify if a function is called at all. Note that gcov requires the executable to be instrumented and the source has to be compiled with the appropriate options. In case the function call counts vary across the threads of a multithreaded program, there may be a load imbalance. The counts can also be used to verify which functions are executed by a single thread only.   Target Audience No background in DTrace is assumed. All DTrace features and constructs used are explained. It is expected the reader has some familiarity with developing applications, knows how to execute an executable, and has some basic understanding of shell scripts. The DTrace Basics DTrace provides dynamic tracing of both the operating system kernel and user processes. Kernel and process activities can be observed across all processes running, or be restricted to a specific process, command, or executable. There is no need to recompile or have access to the source code of the process(es) that are monitored. A probe is a key concept in DTrace. Probes define the events that are available to the user to trace. For example, a probe can be used to trace the entry to a specific system call. The user needs to specify the probe(s) to monitor. The simple D language is available to program the action(s) to be taken in case an event occurs. DTrace is safe, unintrusive, and supports kernel as well as application observability. DTrace probes are organized in sets called providers. The name of a provider is used in the definition of a probe. The user can bind one or more tracing actions to any of the probes that have been provided. A list of all of the available probes on the system is obtained using the -l option on the dtrace command that is used to invoke DTrace. Below an example is shown, but only snippets of the output are listed, because on this system there are over 110,000 probes. # dtrace -l ID PROVIDER MODULE FUNCTION NAME 1 dtrace BEGIN 2 dtrace END 3 dtrace ERROR <lines deleted> 16 profile tick-1000 17 profile tick-5000 18 syscall vmlinux read entry 19 syscall vmlinux read return 20 syscall vmlinux write entry 21 syscall vmlinux write return <lines deleted> 656 perf vmlinux syscall_trace_enter sys_enter 657 perf vmlinux syscall_slow_exit_work sys_exit 658 perf vmlinux emulate_vsyscall emulate_vsyscall 659 lockstat vmlinux intel_put_event_constraints spin-release 660 lockstat vmlinux intel_stop_scheduling spin-release 661 lockstat vmlinux uncore_pcibus_to_physid spin-release <lines deleted> 1023 sched vmlinux __sched_setscheduler dequeue 1024 lockstat vmlinux tg_set_cfs_bandwidth spin-release 1025 sched vmlinux activate_task enqueue 1026 sched vmlinux deactivate_task dequeue 1027 perf vmlinux ttwu_do_wakeup sched_wakeup 1028 sched vmlinux do_set_cpus_allowed enqueue <many more lines deleted> 155184 fbt xt_comment comment_mt return 155185 fbt xt_comment comment_mt_exit entry 155186 fbt xt_comment comment_mt_exit return 163711 profile profile-99 163712 profile profile-1003 # Each probe in this output is identified by a system-dependent numeric identifier and four fields with unique values:   provider - The name of the DTrace provider that is publishing this probe. module - If this probe corresponds to a specific program location, the name of the kernel module, library, or user-space program in which the probe is located. function - If this probe corresponds to a specific program location, the name of the kernel, library, or executable function in which the probe is located. name - A name that provides some idea of the probe's semantic meaning, such as BEGIN, END, entry, return, enqueue, or dequeue.   All probes have a provider name and a probe name, but some probes, such as the BEGIN, END, ERROR, and profile probes, do not specify a module and function field. This type of probe does not instrument any specific program function or location. Instead, these probes refer to a more abstract concept. For example, the BEGIN probe always triggers at the start of the tracing process. Wild cards in probe descriptions are supported. An empty field in the probe description is equivalent to * and therefore matches any possible value for that field. For example, to trace the entry to the malloc() function in libc.so.6 in a process with PID 365, the pid365:libc.so.6:malloc:entry probe can be used. To probe the malloc() function in this process regardless of the specific library it is part of, either the pid365::malloc:entry or pid365:*:malloc:entry probe can be used.   Upon invocation of DTrace, probe descriptions are matched to determine which probes should have an action associated with them and need to be enabled. A probe is said to fire when the event it represents is triggered.   The user defines the actions to be taken in case a probe fires. These need to be written in the D language, which is specific to DTrace, but readers with some programming experience will find it easy to learn. Different actions may be specified for different probe descriptions. While these actions can be specified at the command line, in this article we put all the probes and associated actions in a file. This D program, or script, by convention has the extension ".d". Aggregations are important in DTrace. Since they play a key role in this article we add a brief explanation here. The syntax for an aggregation is @user_defined_name[keys] = aggregation_function(). An example of an aggregation function is sum(arg). It takes a scalar expression as an argument and returns the total value of the specified expressions. For those readers who like to learn more about aggregations in particular we recommend to read this section on aggregations from the Oracle Linux DTrace Guide. This section also includes a list of the available aggregation functions. Testing Environment and Installation Instructions The experiments reported upon here have been conducted in an Oracle Cloud Infrastructure ("OCI") instance running Oracle Linux. The following kernel has been used: $ uname -srvo Linux 4.14.35-1902.3.1.el7uek.x86_64 #2 SMP Mon Jun 24 21:25:29 PDT 2019 GNU/Linux $ The 1.6.4 version of the D language and the 1.2.1 version of DTrace have been used: $ sudo dtrace -Vv dtrace: Sun D 1.6.4 This is DTrace 1.2.1 dtrace(1) version-control ID: e543f3507d366df6ffe3d4cff4beba2d75fdb79c libdtrace version-control ID: e543f3507d366df6ffe3d4cff4beba2d75fdb79c $ DTrace is available on Oracle Linux and can be installed through the following yum command: $ sudo yum install dtrace-utils After the installation has completed, please check your search path! DTrace is invoked through the dtrace command in /usr/sbin. Unfortunately there is a different tool with the same name in /usr/bin. You can check the path is correct through the following command: $ which dtrace /usr/sbin/dtrace $   Oracle Linux is not the only operating system that supports DTrace. It actually has its roots in the Oracle Solaris operating system, but it is also available on macOS and Windows. DTrace is also supported on other Linux based operating systems. For example, this blog article outlines how DTrace could be used on Fedora. Counting Function Calls In this section we show how DTrace can be used to count function calls. Various D programs are shown, successively refining the functionality. The Test Program In the experiments below, a multithreaded version of the multiplication of a matrix with a vector is used. The program is written in C and the algorithm has been parallelized using the Pthreads API. This is a relatively simple test program and makes it easy to verify the call counts are correct. Below is an example of a job that multiplies a 1000x500 matrix with a vector of length 500 using 4 threads. The output echoes the matrix sizes, the number of threads used, and the time it took to perform the multiplication: $ ./mxv.par.exe -m 1000 -n 500 -t 4 Rows = 1000 columns = 500 threads = 4 time mxv = 510 (us) $   A First DTrace Program The D program below lists all functions that are called when executing the target executable. It also shows how often these functions have been executed. Line numbers have been added for ease of reference: 1 #!/usr/sbin/dtrace -s 2 3 #pragma D option quiet 4 5 BEGIN { 6 printf("\n======================================================================\n"); 7 printf(" Function Call Count Statistics\n"); 8 printf("======================================================================\n"); 9 } 10 pid$target:::entry 11 { 12 @all_calls[probefunc,probemod] = count(); 13 } 14 END { 15 printa(@all_calls); 16 } The first line invokes DTrace and uses the -s option to indicate the D program is to follow. At line 3, a pragma is used to supress some information DTrace prints by default. The BEGIN probe spans lines 5-9. This probe is executed once at the start of the tracing and is ideally suited to initialize variables and, as in this case, print a banner. At line 10 we use the pid provider to enable tracing of a user process. The target process is either specified using a particular process id (e.g. pid365), or through the $target macro variable that expands to the process id of the command specified at the command line. The latter form is used here. The pid provider offers the flexibility to trace any command, which in this case is the execution of the matrix-vector multiplication executable. We use wild cards for the module name and function. The probe name is entry and this means that this probe fires upon entering any function of the target process. Lines 11 and 13 contain the mandatory curly braces that enclose the actions taken. In this case there is only one action and it is at line 12. Here, the count() aggregation function is used. It returns how often it has been called. Note that this is on a per-probe basis, so this line counts how often each probe fires. The result is stored in an aggregation with the name @all_calls. Since this is an aggregation, the name has to start with the "@" symbol. The aggregation is indexed through the probefunc and probemod built-in DTrace variables. They expand to the function name that caused the probe to trigger and the module this function is part of. This means that line 12 counts how many times each function of the parent process is executed and the library or exectuable this function is part of. The END probe spans lines 14-16. Recall this probe is executed upon termination of the tracing. Although aggregations are automatically printed upon termination, we explicitly print the aggregation using the printa function. The function and module name(s), plus the respective counts, are printed. Below is the output of a run using the matrix-vector program. It is assumed that the D program shown above is stored in a file with the name fcalls.d. Note that root privileges are needed to use DTrace. This is why we use the sudo tool to execute the D program. By default the DTrace output is mixed with the program output. The -o option is used to store the DTrace output in a separate file. The -c option is used to specifiy the command or executable that needs to be traced. Since we use options on the executable, quotes are needed to delimit the full command. Since the full output contains 149 lines, only some snippets are shown here:   $ sudo ./fcalls.d -c "./mxv.par.exe -m 1000 -n 500 -t 4" -o fcalls.out $ cat fcalls.out ====================================================================== Function Call Count Statistics ====================================================================== _Exit libc.so.6 1 _IO_cleanup libc.so.6 1 _IO_default_finish libc.so.6 1 _IO_default_setbuf libc.so.6 1 _IO_file_close libc.so.6 1 <many more lines deleted> init_data mxv.par.exe 1 main mxv.par.exe 1 <many more lines deleted> driver_mxv mxv.par.exe 4 getopt libc.so.6 4 madvise libc.so.6 4 mempcpy ld-linux-x86-64.so.2 4 mprotect libc.so.6 4 mxv_core mxv.par.exe 4 pthread_create@@GLIBC_2.2.5 libpthread.so.0 4 <many more lines deleted> _int_free libc.so.6 1007 malloc libc.so.6 1009 _int_malloc libc.so.6 1012 cfree libc.so.6 1015 strcmp ld-linux-x86-64.so.2 1205 __drand48_iterate libc.so.6 500000 drand48 libc.so.6 500000 erand48_r libc.so.6 500000 $   The output lists every function that is part of the dynamic call tree of this program, the module it is part of, and how many times the function is called. The list is sorted by default with respect to the function call count. The functions from module mxv.par.exe are part of the user source code. The other functions are from shared libraries. We know that some of these, e.g. drand48(), are called directly by the application, but the majority of these library functions are called indirectly. To make things a little more complicated, a function like malloc() is called directly by the application, but may also be executed by library functions deeper in the call tree. From the above output we cannot make such a distinction. Note that the DTrace functions stack() and/or ustack() could be used to get callstacks to see the execution path(s) where the calls originate from. In many cases this feature is used to zoom in on a specific part of the execution flow and therefore restricted to a limited set of probes. A Refined DTrace Program While the D program shown above is correct, the list with all functions that are called is quite long, even for this simple application. Another drawback is that there are many probes that trigger, slowing down program execution. In the second version of our D program, we'd like to restrict the list to user functions called from the executable mxv.par.exe. We also want to format the output, print a header and display the function list in alphabetical order. The modified version of the D program is shown below: 1 #!/usr/sbin/dtrace -s 2 3 #pragma D option quiet 4 #pragma D option aggsortkey=1 5 #pragma D option aggsortkeypos=0 6 7 BEGIN { 8 printf("\n======================================================================\n"); 9 printf(" Function Call Count Statistics\n"); 10 printf("======================================================================\n"); 11 } 12 pid$target:a.out::entry 13 { 14 @call_counts_per_function[probefunc] = count(); 15 } 16 END { 17 printf("%-40s %12s\n\n", "Function name", "Count"); 18 printa("%-40s %@12lu\n", @call_counts_per_function); 19 } Two additional pragmas appear at lines 4-5. The pragma at line 4 enables sorting the aggregations by a key and the next one sets the key to the first field, the name of the function that triggered the probe. The BEGIN probe is unchanged, but the probe spanning lines 12-15 has two important differences compared to the similar probe used in the first version of our D program. At line 12, we use a.out for the name of the module. This is an alias for the module name in the pid probe. It is replaced with the name of the target executable, or command, to be traced. In this way, the D program does not rely on a specific name for the target. The second change is at line 14, where the use of the probemod built-in variable has been removed because it is no longer needed. By design, only functions from the target executable trigger this probe now. The END probe has also been modified. At line 17, a statement has been added to print the header. The printa statement at line 18 has been extended with a format string to control the layout. This string is optional, but ideally suitable to print (a selection of) the fields of an aggregation. We know the first field is a string and the result is a 64 bit unsigned integer number, hence the use of the %s and %lu formats. The thing that is different compared to a regular printf format string in C/C++ is the use of the "@" symbol. This is required when printing the result of an aggregation function. Below is the output using the modified D program. The command to invoke this script is exactly the same as before. ====================================================================== Function Call Count Statistics ====================================================================== Function name Count allocate_data 1 check_results 1 determine_work_per_thread 4 driver_mxv 4 get_user_options 1 get_workload_stats 1 init_data 1 main 1 mxv_core 4 my_timer 2 print_all_results 1 The first thing to note is that with 11 entries, the list is much shorter. By design, the list is alphabetically sorted with respect to the function name. Since we no longer trace every function called, the tracing overhead has also been reduced substantially. A DTrace Program with Support for Multithreading With the above D program one can easily see how often our functions are executed. Although our goal of counting user function calls has been achieved, we'd like to go a little further. In particular, to provide statistics on the multithreading characteristics of the target application:   Print the name of the executable that has been traced, as well as the total number of calls to user defined functions. Print how many function calls each thread executed. This shows whether all threads approximately execute the same number of function calls. Print a function list with the call counts for each thread. This allows us to identify those functions executed sequentially and also provides a detailed comparison to verify load balancing at the level of the individual functions.   The D program that implements this additional functionality is shown below. 1 #!/usr/sbin/dtrace -s 2 3 #pragma D option quiet 4 #pragma D option aggsortkey=1 5 #pragma D option aggsortkeypos=0 6 7 BEGIN { 8 printf("\n======================================================================\n"); 9 printf(" Function Call Count Statistics\n"); 10 printf("======================================================================\n"); 11 } 12 pid$target:a.out:main:return 13 { 14 executable_name = execname; 15 } 16 pid$target:a.out::entry 17 { 18 @total_call_counts = count(); 19 @call_counts_per_function[probefunc] = count(); 20 @call_counts_per_thr[tid] = count(); 21 @call_counts_per_function_and_thr[probefunc,tid] = count(); 22 } 23 END { 24 printf("\n============================================================\n"); 25 printf("Name of the executable : %s\n" , executable_name); 26 printa("Total function call counts : %@lu\n", @total_call_counts); 27 28 printf("\n============================================================\n"); 29 printf(" Aggregated Function Call Counts\n"); 30 printf("============================================================\n"); 31 printf("%-40s %12s\n\n", "Function name", "Count"); 32 printa("%-40s %@12lu\n", @call_counts_per_function); 33 34 printf("\n============================================================\n"); 35 printf(" Function Call Counts Per Thread\n"); 36 printf("============================================================\n"); 37 printf("%6s %12s\n\n", "TID", "Count"); 38 printa("%6d %@12lu\n", @call_counts_per_thr); 39 40 printf("\n============================================================\n"); 41 printf(" Thread Level Function Call Counts\n"); 42 printf("============================================================\n"); 43 printf("%-40s %6s %10s\n\n", "Function name", "TID", "Count"); 44 printa("%-40s %6d %@10lu\n", @call_counts_per_function_and_thr); 45 } The first 11 lines are unchanged. Lines 12-15 define an additional probe that looks remarkably similar to the probe we have used so far, but there is an important difference. The wild card for the function name is gone and instead we specify main explicitly. That means this probe only fires upon entry of the main program. This is exactly what we want here, because this probe is only used to capture the name of the executable. It is available through the built-in variable execname. Another minor difference is that this probe triggers upon the return from this function. This is purely for demonstration purposes, because the same result would be returned if the trigger was on the entry to this function. One may wonder why we do not capture the name of the executable in the BEGIN probe. After all, it fires at the start of the tracing process and only once. The issue is that at this point in the tracing, execname does not return the name of the executable, but the file name of the D program. The probe used in the previous version of the D program has been extended to gather more statistics. There are now four aggregations at lines 18-21:   At line 18 we simply increment the counter each time this probe triggers. In other words, aggregation @total_call_counts contains the total number of function calls. The statement at line 19 is identical to what was used in the previous version of this probe. At line 20, the tid built-in variable is used as the key into an aggregation called @call_counts_per_thr. This variable contains the integer id of the thread triggering the probe. The count() aggregation function is used as the value. Therefore this statement counts how many function calls a specific thread has executed. Another aggregation called @call_counts_per_function_and_thr is used at line 21. Here we use both the probefunc and tid built-in variables as a key. Again the count() aggregation function is used as the value. In this way we break down the number of calls from the function(s) triggering this probe by the thread id.   The END probe is more extensive than before and spans lines 23-45. There are no new features or constructs though. The aggregations are printed in a similar way and the "@" symbol is used in the format string to print the results of the aggregations. The results of this D program are shown below. ====================================================================== Function Call Count Statistics ====================================================================== ============================================================ Name of the executable : mxv.par.exe Total function call counts : 21 ============================================================ Aggregated Function Call Counts ============================================================ Function name Count allocate_data 1 check_results 1 determine_work_per_thread 4 driver_mxv 4 get_user_options 1 get_workload_stats 1 init_data 1 main 1 mxv_core 4 my_timer 2 print_all_results 1 ============================================================ Function Call Counts Per Thread ============================================================ TID Count 20679 13 20680 2 20681 2 20682 2 20683 2 ============================================================ Thread Level Function Call Counts ============================================================ Function name TID Count allocate_data 20679 1 check_results 20679 1 determine_work_per_thread 20679 4 driver_mxv 20680 1 driver_mxv 20681 1 driver_mxv 20682 1 driver_mxv 20683 1 get_user_options 20679 1 get_workload_stats 20679 1 init_data 20679 1 main 20679 1 mxv_core 20680 1 mxv_core 20681 1 mxv_core 20682 1 mxv_core 20683 1 my_timer 20679 2 print_all_results 20679 1 Right below the header, the name of the executable (mxv.par.exe) and the total number of function calls (21) are printed. This is followed by the same table we saw before. The second table is titled "Function Call Counts Per Thread". The data confirms that 5 threads have been active. There is one master thread and it creates the other four threads. The thread ids are in the range 20679-20683. Note that these numbers are not fixed. A subsequent run most likely shows different numbers. What is presumably the main thread executes 13 function calls. The other four threads execute two function calls each. These numbers don't tell us much about what is really going on under the hood and this is why we generate a third table titled "Thread Level Function Call Counts". The data is sorted with respect to the function names. What we see in this table is that the main thread executes all functions, other than driver_mxv and mxv_core. These two functions are executed by the four threads that have been created. We also see that function determine_work_per_thread is called four times by the main thread. This function is used to compute the amount of work to be executed by each thread. In a more scalable design, this should be handled by the individual threads. Function my_timer is executed twice by the main thread. That is because this function is called at the start and end of the matrix-vector multiplication. While this table shows the respective thread ids, it is not immediately clear which function(s) each thread executes. It is not difficult to create a table that shows the sorted thread ids in the first column and the function names, as well as the respective counts, next to the ids. This is left as an exercise to the reader. There is one more thing we would like to mention. While the focus has been on the user written functions, there is no reason why other functions cannot be included. For example, we know this program uses the Pthreads library libpthreads.so. In case functions from this library should be counted as well, a one line addition to the main probe is sufficient: 1 pid$target:a.out::entry, 2 pid$target:libpthread.so:pthread_*:entry 3 { 4 @total_call_counts = count(); 5 @call_counts_per_function[probefunc] = count(); 6 @call_counts_per_thr[tid] = count(); 7 @call_counts_per_function_and_thr[probefunc,tid] = count(); 8 } The differences are in lines 1-2. Since we want to use the same actions for both probes, we simply place them back to back, separated by a comma. The second probe specifies the module (libpthread.so), but instead of tracing all functions from this library, for demonstration purposes we use a wild card to only select function names starting with pthread_. Additional Reading Material The above examples, plus the high level coverage of the DTrace concepts and terminology, are hopefully sufficient to get started. More details are beyond the scope of this article, but luckily, DTrace is very well documented. For example, the Oracle Linux DTrace Guide, covers DTrace in detail and includes many short code fragments. In case more information is needed, there are many other references and examples. Regarding the latter, the Oracle DTrace Tutorial contains a variety of example programs.

This blog entry was provided by Ruud van der Pas   Introduction DTrace is often positioned as an operating system analysis tool for the system administrators, but it has a wider use than this. In...

Announcements

Oracle’s Linux Team Wishes the Java Community a Happy 25th

Thanks to Kurt Goebel and Van Okamura for their help with this post.   From one open source community to another, Oracle’s Linux team would like to congratulate the Java community on its 25th anniversary! Java has an impressive history. It was a breakthrough in programming languages, allowing developers to write once and have code run anywhere. And, it has enabled developers to create a myriad of innovative solutions that help run our world. Read Georges Saab’s post to learn more. Both open source technologies, Java and Linux benefit from communities that collectively drive their advancements. While the technologies aren’t similar, there are areas where both work together and complement each other. One area is Java’s support for Linux HugePages. Using Linux HugePages can improve system performance by reducing the amount of resources needed to manage memory. The result of less overhead in the system means more resources are available for Java and the Java app, which can make both run faster. Another area is OpenJDK. It has been shipping with Linux distributions continuously and every Linux distribution has Java support out of the box. Linux was and is ubiquitous on a wide range of hardware platforms. As part of Linux, OpenJDK and Java are also running on many different hardware architectures. This helped to bring a Java ecosystem to embedded devices. Today, Java and Linux are used in virtually all industries and on everything from laptops to data centers, clouds to satellites, game consoles to scientific supercomputers. Here's to 25 more years of being moved by Java. From all of us (and Oracle Tux), we wish the Java community continued success. #MovedbyJava #OracleLinux  

Thanks to Kurt Goebel and Van Okamura for their help with this post.   From one open source community to another, Oracle’s Linux team would like to congratulate the Java community on its...

Linux

IT Convergence Improves End User Experience with Quicker Server Builds, Improved SLAs and Reduced Support Costs

IT Convergence is a global applications services provider. For the past 20 years, it has offered customers Oracle solutions, such as enterprise applications like Oracle E-Business Suite. This article explores how IT Convergence built servers faster, improved its SLAs, and reduced support costs since moving to a hosted cloud services environment running on Oracle Linux and Oracle VM.   As an Oracle Platinum Partner, IT Convergence has a comprehensive service offering across all three pillars of the Cloud (IaaS, PaaS, SaaS).  It can build, manage, and optimize customer solutions.  Additionally, it can provide connectivity into Oracle Cloud Infrastructure . These solutions create value for thousands of customers globally, including one-third of Fortune 500 companies. Before IT Convergence moved their environment to Oracle Linux and Oracle VM, they had a hybrid environment running Red Hat Enterprise Linux and VMware. Upon choosing Oracle Linux, IT Convergence decided to use the Unbreakable Enterprise Kernel (UEK) for Oracle Linux as it proved particularly fast with Oracle E-Business Suite. This video interview explains how easy and painless the conversion to Oracle Linux and Oracle VM was for IT Convergence. Its teams were able to convert 2000 servers online, without any downtime or reboots, within three months. This move to Oracle Linux and Oracle VM has resulted in several benefits. By using Oracle VM and Oracle VM Templates, IT Convergence can now build servers more rapidly for its customers. What previously took 20 hours to manually build now takes the team about two hours. Oracle VM Templates are self-contained and pre-configured virtual machines of key Oracle technologies. Each Oracle VM Template is packaged using Oracle best practices, which helps eliminate installation and configuration costs, reduces risk, and dramatically shortens deployment time. Other benefits from migrating to Oracle Linux and Oracle VM are related to technical support.  IT Convergence was supporting multiple operating systems (OS) and hypervisor solutions. This added complexity when attempting to resolve support tickets across different vendors. Specifically, lots of time was spent trying to determine the root cause analysis. Consequently, the operations team was not always able to complete a support ticket within its two-hour SLA window. Given the rest of IT Convergence’s stack is largely Oracle, from the database to the applications level, using Oracle Linux and Oracle VM simplified its vendor portfolio. It also unified support across the applications, OS and hypervisors. Now, any support tickets go through a single vendor for resolution. This has improved  the team’s overall technical support SLA capabilities.   Additionally, by moving to Oracle Linux and Oracle VM Premier Support, IT Convergence saved approximately $100,000 annually. These support cost savings in turn allow IT Convergence to offer more competitive pricing to its customers.  A win-win!    We are proud to help customers like IT Convergence to improve operational capabilities and its customer offerings.  Watch this video to learn more!  

IT Convergence is a global applications services provider. For the past 20 years, it has offered customers Oracle solutions, such as enterprise applications like Oracle E-Business Suite. This article...

Linux

Getting Started With The Vagrant Libvirt Provider For Oracle Linux

Introduction As recently announced by Sergio we now support the libvirt provider for our Oracle Linux Vagrant Boxes. The libvirt provider is a good alternative to the virtualbox one when you already use KVM on your host, as KVM and VirtualBox virtualization are mutually exclusive. It is also a good choice when running Vagrant on Oracle Cloud Infrastructure. This blog post will guide you through the simple steps needed to use these new boxes on your Oracle Linux host (Release 7 or 8). Virtualization Virtualization is easily installed using the Virtualization Host package group. On Oracle Linux 7, first enable the ol7_kvm_utils channel to get recent version of the packages: sudo yum-config-manager --enable ol7_kvm_utils After installing the packages, start the libvirtd service and add you user to the libvirt group: sudo yum group install "Virtualization Host" sudo systemctl enable --now libvirtd sudo usermod -a -G libvirt opc Do not forget to re-login to activate the group change for your user! Vagrant We need to install HashiCorp Vagrant as well as the Vagrant Libvirt Provider contributed plugin: # Vagrant itself: sudo yum install https://releases.hashicorp.com/vagrant/2.2.9/vagrant_2.2.9_x86_64.rpm # Libraries needed for the plugin: sudo yum install libxslt-devel libxml2-devel libvirt-devel \ libguestfs-tools-c ruby-devel gcc make Oracle Linux 8: at the time of this writing there is a compatibility issue between system libraries and the ones embedded with Vagrant. Run the following script as root to update the Vagrant libraries: #!/usr/bin/env bash # Description: override krb5/libssh libraries in Vagrant embedded libraries set -e # Get pre-requisites dnf -y install \ libxslt-devel libxml2-devel libvirt-devel \ libguestfs-tools-c ruby-devel \ gcc byacc make cmake gcc-c++ mkdir -p vagrant-build cd vagrant-build dnf download --source krb5-libs libssh # krb5 rpm2cpio krb5-1.17-*.src.rpm | cpio -idmv krb5-1.17.tar.gz tar xzf krb5-1.17.tar.gz pushd krb5-1.17/src ./configure make cp -a lib/crypto/libk5crypto.so.3* /opt/vagrant/embedded/lib64/ popd # libssh rpm2cpio libssh-0.9.0-*.src.rpm | cpio -imdv libssh-0.9.0.tar.xz tar xJf libssh-0.9.0.tar.xz mkdir build pushd build cmake ../libssh-0.9.0 -DOPENSSL_ROOT_DIR=/opt/vagrant/embedded make cp lib/libssh* /opt/vagrant/embedded/lib64/ popd We are now ready to install the plugin (as your non-privileged user): vagrant plugin install vagrant-libvirt Firewall The libvirt provider uses NFS to mount the /vagrant shared folder in the guest. Your firewall must be configured to allow the NFS traffic between the host and the guest. Oracle Linux 7 You can allow NFS traffic in your default zone: sudo firewall-cmd --permanent --add-service=nfs3 sudo firewall-cmd --permanent --add-service=mountd sudo firewall-cmd --permanent --add-service=rpc-bind sudo systemctl restart firewalld Alternatively you can add the libvirt bridge to your trusted zone: sudo firewall-cmd --zone=trusted --add-interface=virbr1 sudo systemctl restart firewalld Oracle Linux 8 With Oracle Linux 8, the libvirt bridge is automatically added to the libvirt zone. Traffic must be allowed in that zone: sudo firewall-cmd --permanent --zone libvirt --add-service=nfs3 sudo firewall-cmd --permanent --zone libvirt --add-service=mountd sudo firewall-cmd --permanent --zone libvirt --add-service=rpc-bind sudo systemctl restart firewalld Privileges considerations To configure NFS, Vagrant will require root privilege when you start/stop guest instances. Unless you are happy to enter your password on every vagrant up you should consider enabling password-less sudo for your user. Alternatively you can enable fine grained sudoers access as described in Root Privilege Requirement section of the Vagrant documentation. Using libvirt boxes Your first libvirt guest You are now ready to use livirt enabled boxes! mkdir ol7 cd ol7 vagrant init oraclelinux/7 https://oracle.github.io/vagrant-boxes/boxes/oraclelinux/7.json vagrant up Libvirt configuration While the libvirt provider exposes quite a lot of configuration parameters, most Vagrantfiles will run with no or little modification. Typically when you have for VirtualBox: config.vm.provider "virtualbox" do |vb| vb.cpus = 4 vb.memory = 4096 end You will need for libvirt: config.vm.provider :libvirt do |libvirt| libvirt.cpus = 4 libvirt.memory = 4096 end The Oracle vagrant-boxes repository is being updated to support the new libvirt boxes. Tips and tricks Virsh The virsh command can be used to monitor the libvirt resources. By default vagrant-libvirt uses the qemu:///system URI to connect to the KVM hypervisor and images are stored in the default storage pool. Example: [opc@bommel ~]$ vagrant global-status id name provider state directory -------------------------------------------------------------------------------------------------- 7ec55b3 ol7-vagrant libvirt shutoff /home/opc/src/vagrant-boxes/OracleLinux/7 3fd9dd9 registry libvirt shutoff /home/opc/src/vagrant-boxes/ContainerRegistry c716711 ol7-docker-engine libvirt running /home/opc/src/vagrant-boxes/DockerEngine 6a0cb46 worker1 libvirt running /home/opc/src/vagrant-boxes/OLCNE a262a29 worker2 libvirt running /home/opc/src/vagrant-boxes/OLCNE 538e659 master1 libvirt running /home/opc/src/vagrant-boxes/OLCNE b6d2661 ol6-vagrant libvirt running /home/opc/src/vagrant-boxes/OracleLinux/6 41aaa7e oracle-19c-vagrant libvirt running /home/opc/src/vagrant-boxes/OracleDatabase/19.3.0 [opc@bommel ~]$ virsh -c qemu:///system list --all Id Name State ------------------------------------------------- 23 DockerEngine_ol7-docker-engine running 24 OLCNE_worker1 running 25 OLCNE_worker2 running 26 OLCNE_master1 running 30 6_ol6-vagrant running 31 19.3.0_oracle-19c-vagrant running - 7_ol7-vagrant shut off - ContainerRegistry_registry shut off [opc@bommel ~]$ virsh -c qemu:///system vol-list --pool default Name Path ----------------------------------------------------------------------------------------------------------------------------------------------- 19.3.0_oracle-19c-vagrant.img /var/lib/libvirt/images/19.3.0_oracle-19c-vagrant.img 6_ol6-vagrant.img /var/lib/libvirt/images/6_ol6-vagrant.img 7_ol7-vagrant.img /var/lib/libvirt/images/7_ol7-vagrant.img ContainerRegistry_registry-vdb.qcow2 /var/lib/libvirt/images/ContainerRegistry_registry-vdb.qcow2 ContainerRegistry_registry.img /var/lib/libvirt/images/ContainerRegistry_registry.img DockerEngine_ol7-docker-engine-vdb.qcow2 /var/lib/libvirt/images/DockerEngine_ol7-docker-engine-vdb.qcow2 DockerEngine_ol7-docker-engine.img /var/lib/libvirt/images/DockerEngine_ol7-docker-engine.img ol7-latest_vagrant_box_image_0.img /var/lib/libvirt/images/ol7-latest_vagrant_box_image_0.img OLCNE_master1.img /var/lib/libvirt/images/OLCNE_master1.img OLCNE_worker1.img /var/lib/libvirt/images/OLCNE_worker1.img OLCNE_worker2.img /var/lib/libvirt/images/OLCNE_worker2.img oraclelinux-VAGRANTSLASH-6_vagrant_box_image_6.10.130.img /var/lib/libvirt/images/oraclelinux-VAGRANTSLASH-6_vagrant_box_image_6.10.130.img oraclelinux-VAGRANTSLASH-6_vagrant_box_image_6.10.132.img /var/lib/libvirt/images/oraclelinux-VAGRANTSLASH-6_vagrant_box_image_6.10.132.img oraclelinux-VAGRANTSLASH-7_vagrant_box_image_7.7.17.img /var/lib/libvirt/images/oraclelinux-VAGRANTSLASH-7_vagrant_box_image_7.7.17.img oraclelinux-VAGRANTSLASH-7_vagrant_box_image_7.8.135.img /var/lib/libvirt/images/oraclelinux-VAGRANTSLASH-7_vagrant_box_image_7.8.135.img Removing box image The vagrant box remove command removes the box from the user .vagrant directory, but not from the storage pool. Use virsh to cleanup the pool: [opc@bommel ~]$ vagrant box list oraclelinux/6 (libvirt, 6.10.130) oraclelinux/6 (libvirt, 6.10.132) oraclelinux/7 (libvirt, 7.8.131) oraclelinux/7 (libvirt, 7.8.135) [opc@bommel ~]$ vagrant box remove oraclelinux/6 --provider libvirt --box-version 6.10.130 Removing box 'oraclelinux/6' (v6.10.130) with provider 'libvirt'... Vagrant-libvirt plugin removed box only from your LOCAL ~/.vagrant/boxes directory From Libvirt storage pool you have to delete image manually(virsh, virt-manager or by any other tool) [opc@bommel ~]$ virsh -c qemu:///system vol-delete --pool default oraclelinux-VAGRANTSLASH-6_vagrant_box_image_6.10.130.img Vol oraclelinux-VAGRANTSLASH-6_vagrant_box_image_6.10.130.img deleted Libvirt CPU emulation mode The default libvirt CPU emulation mode is host-model, that is: the guest inherits capabilities from the host. Should the guest not start in this mode, you can override it using the custom mode – e.g.: config.vm.provider :libvirt do |libvirt| libvirt.cpu_mode = 'custom' libvirt.cpu_model = 'Skylake-Server-IBRS' libvirt.cpu_fallback = 'allow' end You can list the available CPU models with virsh cpu-models x86_64. Storage By default, the Vagrant Libvirt provider will use the default libvirt storage pool which stores images in /var/lib/libvirt/images. The storage_pool_name option allows you to use any other pool/location. Example: On the libvirt side, create a pool: [opc@bommel ~]$ virsh -c qemu:///system Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # pool-define-as vagrant dir --target /data/vagrant Pool vagrant defined virsh # pool-start vagrant Pool vagrant started virsh # pool-autostart vagrant Pool vagrant marked as autostarted In your Vagrantfile, set the storage_pool_name option: config.vm.provider :libvirt do |libvirt| libvirt.storage_pool_name = 'vagrant' end Vagrant Libvirt defaults If you have site specific options, instead of modifying all your Vagrantfiles, you can define them globally in ~/.vagrant.d/Vagrantfile (see Load Order and Merging). E.g: # Vagrant local defaults Vagrant.configure(2) do |config| config.vm.provider :libvirt do |libvirt| libvirt.cpu_mode = 'custom' libvirt.cpu_model = 'Skylake-Server-IBRS' libvirt.cpu_fallback = 'allow' libvirt.storage_pool_name = 'vagrant' end end VirtualBox and libvirt on the same host You cannot run VirtualBox and libvirt guests at the same time, but you still can have both installed and switch from the one to the other providing there is no guest VM running when you switch. The only thing you have to do is to stop/start their respective services – e.g. to switch from VirtualBox to libvirt: systemctl stop vboxdrv.service systemctl start libvirtd.service Screencast

Introduction As recently announced by Sergio we now support the libvirt provider for our Oracle Linux Vagrant Boxes. The libvirt provider is a good alternative to the virtualbox one when you already...

Linux

Using rclone to copy data in and out of Oracle Cloud Object Storage

Introduction In this blog post I’ll show how to use rclone on Oracle Linux with free object storage services included in Oracle Cloud Free Tier. Free tier includes 20GiB of object storage. Rclone is a command line program to sync files and directories to and from various cloud-based storage services. Oracle Cloud Object Storage is Amazon S3 compatible, so I’ll use Rclone’s S3 capabilities to move data between my local Oracle Linux system and object storage. One way to configure Rclone is to run rclone config and step through a series of questions, adding Oracle Cloud Object Storage as an S3 compatible provider. Instead, I’m going to use Oracle Cloud Infrastructure’s Cloud Shell to gather the relevant data and construct what’s ultimately a small configuration file. The high level steps are: On Oracle Cloud Infrastructure: Create an object storage bucket Create an Access Key/Secret Key pair Gather relevant values for Rclone configuration On your local Linux system Install Rclone Create an Rclone config file Create Object Storage Bucket One of the benefits of Cloud Shell is that it includes pre-configured OCI Client tools so you can begin using the command line interface without any configuration steps. Accessing OCI Cloud Shell   Starting in Cloud Shell, set up environment variables to make running subsequent commands easier. The following stores your region and tenancy OCID, and storage namespace in environment variables. I'm using both JMESPath and jq to parse JSON for illustration purposes. export R=$(curl -s http://169.254.169.254/opc/v1/instance/ | jq -r '.region') export C=$(oci os ns get-metadata --query 'data."default-s3-compartment-id"' --raw-output) export N=$(oci os ns get | jq -r '.data') Cloud Shell in action   To create a storage bucket: oci os bucket create --name mybucket --compartment-id $C Create an Access Key/Secret Key pair The Amazon S3 Compatibility API relies on a signing key called a Customer Secret Key. export U=$(oci os bucket list --compartment-id=$C --query 'data [?"name"==`mybucket`] | [0]."created-by"' --raw-output) oci iam customer-secret-key create --display-name storagekey --user-id $U export K=$(oci iam customer-secret-key list --user-id $U | jq -r '[.data[] | select (."display-name"=="storagekey")][0]."id"') In the response from oci iam customer-secret-key, id corresponds to the access key and key represents the secret key. Make a note of the key immediately because it will not be shown to you again! Finally, gather up the relevant values for the Rclone configuration. Remember to copy the secret key and save it somewhere. Run the following to collect and display the information you need. echo "ACCESS KEY: $K"; echo "SECRET KEY: check your notes"; echo "NAMESPACE: $N"; echo "REGION: $R" Set Up Linux System with Rclone Over to the local system on which Rclone will be used to move files to- and from object storage. Install Rclone To install Rclone: $ sudo yum install -y oracle-epel-release-el7 && sudo yum install -y rclone Create the Rclone Configuration File In your home directory, create a file, .rclone.conf using the contents below, replacing the values you gathered earlier: [myobjectstorage] type = s3 provider = Other env_auth = false access_key_id = <ACCESS KEY> secret_access_key = <SECRET KEY> endpoint = <NAMESPACE>.compat.objectstorage.<REGION>.oraclecloud.com Note that if the storage bucket you created is not in your home region, you must also need to add this entry to the [myobjectstorage] stanza: region = <REGION> Running Rclone You are now ready to start copying files to object storage. The following copies a file, myfile.txt to object storage. You can show the contents of object storage using rclone ls. $ echo `date` > myfile.txt $ rclone copy myfile.txt myobjectstorage:/mybucket $ rclone ls myobjectstorage:/mybucket Conclusion Rclone is a useful command line utility to interact with, among other types, S3 compatible cloud-based object storage. Oracle Cloud Object Storage has an S3 compatible API. In this blog post, I showed how to install Rclone from Oracle Linux yum server and configure it using free Oracle Cloud Object Storage. References Rclone documentation

Introduction In this blog post I’ll show how to use rclone on Oracle Linux with free object storage services included in Oracle Cloud Free Tier. Free tier includes 20GiB of object storage. Rclone is a...

Linux

Oracle Linux Vagrant Boxes Now Include Catalog Data and Add Support for libvirt Provider

Introduction We recently made some changes in the way we publish Oracle Linux Vagrant Boxes. First, we added boxes for the libvirt provider, for use with KVM. Secondly, we added Vagrant catalog data in JSON format. Vagrant Box Catalog Data With the catalog data in place, instead of launching vagrant environments using a URL to a box file, you launch it by pointing to a JSON file. For example: $ vagrant init oraclelinux/7 https://oracle.github.io/vagrant-boxes/boxes/oraclelinux/7.json $ vagrant up $ vagrant ssh This creates a Vagrantfile that includes the following two lines causes the most recently published Oracle Linux 7 box to be downloaded (if needed) and started: config.vm.box = "oraclelinux/7" config.vm.box_url = "https://oracle.github.io/vagrant-boxes/boxes/oraclelinux/7.json" Using this catalog-based approach to referencing Vagrant boxes, adds version-awareness and the ability to update boxes. During vagrant up you’ll be notified when a newer version of a box is available for your environment: $ vagrant up; vagrant ssh Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'oraclelinux/7' version '7.7.15' is up to date... ==> default: A newer version of the box 'oraclelinux/7' for provider 'virtualbox' is ==> default: available! You currently have version '7.7.15'. The latest is version ==> default: '7.8.128'. Run `vagrant box update` to update. To update a box: $ vagrant box update ==> default: Checking for updates to 'oraclelinux/7' default: Latest installed version: 7.7.15 default: Version constraints: default: Provider: virtualbox ==> default: Updating 'oraclelinux/7' with provider 'virtualbox' from version ==> default: '7.7.15' to '7.8.128'... ==> default: Loading metadata for box 'https://oracle.github.io/vagrant-boxes/boxes/oraclelinux/7.json' ==> default: Adding box 'oraclelinux/7' (v7.8.128) for provider: virtualbox default: Downloading: https://yum.oracle.com/boxes/oraclelinux/ol7/ol7u8-virtualbox-b128.box default: Calculating and comparing box checksum... ==> default: Successfully added box 'oraclelinux/7' (v7.8.128) for 'virtualbox'! To check if a later version of a box is available: $ vagrant box outdated --global * 'rpmcheck' for 'virtualbox' wasn't added from a catalog, no version information * 'oraclelinux/7' for 'virtualbox' is outdated! Current: 7.7.15. Latest: 7.8.128 * 'oraclelinux/6' for 'virtualbox' is outdated! Current: 6.10.13. Latest: 6.10.127 * 'oraclelinux/6' for 'virtualbox' is outdated! Current: 6.8.3. Latest: 6.10.127 Another benefit of using catalog data to install Oracle Linux Vagrant boxes, is that checksums are automatically verified after download. Vagrant Boxes for libvirt Provider With the newly released boxes for the libvirt provider you can create Oracle Linux Vagrant environments using KVM as the hypervisor. In this blog post, Philippe explains how to get started. Conclusion In this blog post, I discussed changes we made to the way we publish Oracle Linux Vagrant boxes and showed how to use Vagrant box catalog data to install and manage box versions.

Introduction We recently made some changes in the way we publish Oracle Linux Vagrant Boxes. First, we added boxes for the libvirt provider, for use with KVM. Secondly, we added Vagrant catalog data in...

Announcements

Updated Oracle Database images now available in the Oracle Cloud Marketplace

Oracle is pleased and honored to announce the updated "Oracle Database" availability in the "Oracle Cloud MarketPlace". By leveraging the "Oracle Database" you will have the option to automatically deploy a fully functional Database environment by pasting a simple cloud-config script; the deployment allows for basic customization of the environment, further configurations, like adding extra disks, NICs, is always possible post-deployment. The framework allows for simple cleanup and re-deployment, via the Marketplace interface (terminate instance and re-launch), or cleanup the Instance within and re-deploy the same Instance with changed settings (see Usage Info below). To easily introduce to the different customization options, available with the "Oracle Database" we also created a dedicated document with examples on the Oracle Database customization deployment. The deployed Instance will be based on the following software stack: Oracle Cloud Infrastructure Native Instance Oracle Linux 7.8 UEK5 (Unbreakable Enterprise Kernel, release 5) Update 3 Updated Oracle Database 12cR2, 18c and 19c with April, 2020 Critical Patch Update For further information: Oracle Database deployment on Oracle Cloud Infrastructure Oracle Database on Oracle Cloud MarketPlace Oracle Cloud Marketplace Oracle Cloud: Try it for free Oracle Database Templates for Oracle VM

Oracle is pleased and honored to announce the updated "Oracle Database" availability in the "Oracle Cloud MarketPlace". By leveraging the "Oracle Database" you will have the option to automatically...

Announcements

Announcing the release of Oracle Linux 8 Update 2

Oracle is pleased to announce the general availability of Oracle Linux 8 Update 2. Individual RPM packages are available on the Unbreakable Linux Network (ULN) and the Oracle Linux yum server. ISO installation images will soon be available for download from the Oracle Software Delivery Cloud, and Docker images will soon be available via Oracle Container Registry and Docker Hub. Starting with Oracle Linux 8 Update 2, the Unbreakable Enterprise Kernel Release 6 (UEK R6) is included on the installation image along with the Red Hat Compatible Kernel (RHCK). For new installations, UEK R6 is enabled and installed as the default kernel on first boot. UEK R6 is a heavily tested and optimized operating system kernel for Oracle Linux 7 Update 7, and later, and Oracle Linux 8 Update 1, and later. The kernel is developed, built, and tested on 64-bit Arm (aarch64) and 64-bit AMD/Intel (x86-64) platforms. UEK R6 is based on the mainline Linux kernel version 5.4 and includes driver updates, bug fixes, and security fixes; additional features are enabled to provide support for key functional requirements and patches are applied to improve performance and optimize the kernel for use in enterprise operating environments. Oracle Linux 8 Update 2 ships with: UEK R6 (kernel-uek-5.4.17-2011.1.2.el8uek) for x86_64 (Intel & AMD) and aarch64 (Arm) platforms RHCK (kernel-4.18.0-193.el8) for x86_64 (Intel & AMD) platform where both include bug fixes, security fixes and enhancements. Notable New Features for All Architectures Unbreakable Enterprise Kernel Release 6 (UEK6) For information about UEK6, please refer to the UEK6 announcement Red Hat Compatible Kernel (RHCK) "kexec-tools" documentation now includes Kdump FCoE target support "numactl" manual page updated to clarify information about memory usage "rngd" can run with non-root privileges Secure Boot available by default Compiler and Development Toolset (available as Application Streams) Compiler and Toolset Clang toolset updated to version 9.0.0 Rust toolset updated to version 1.39 Go toolset updated to 1.13.4 GCC Toolset 9 GCC version updated to 9.2.1 GDB version updated to 8.3 For further GCC Toolset updates, please check Oracle Linux 8 Update 2 release notes Database Oracle Linux 8 Update 2 ships with version 8.0 of the MySQL database Dynamic Programming Languages, Web "maven:3.6" module stream available "Python 3.8" is provided by a new python38 module. Python 3.6 continues to be supported in Oracle Linux 8. The introduction of "Python 3.8" in Oracle Linux 8 Update 2 requires that you specify which version of "mod_wsgi" you want to install, as "Python 3.6" is also supported in this release. "perl-LDAP" and "perl-Convert-ASN1" packages are now released as part of Oracle Linux 8 Update 2. Infrastructure Services "bind" updated to version 9.11.13 "tuned" updated to version 2.13 Networking "eBPF" for Traffic Control kernel subsystem supported (previously available as a technology preview) "firewalld" updated to version 0.8 Podman, Buildah, and Skopeo Container Tools are now supported on both UEK R6 and RHCK Security "audit" updated to version 3.0-0.14; several improvements introduced between Kernel version 4.18 (RHCK) and version 5.4 (UEK R6) of Audit. "lvmdbusd" service confined by SELinux. "openssl-pkcs11" updated to version 0.4.10. "rsyslog" updated to version 8.1911.0. SCAP Security Guide includes ACSC (Australian Cyber Security Centre) Essential Eight support. SELinux SELinux setools-gui and setools-console-analyses packages included SELinux improved to enable confined users to manage user session services semanage export able to display customizations related to permissive domains semanage includes capability for listing and modifying SCTP and DCCP ports "sudo" updated to version 1.8.29-3. "udica" is now capable of adding new allow rules generated from SELinux denials to an existing container policy. Virtualization Nested Virtual Machines (VM) capability added; this enhancement enables an Oracle Linux 7 or Oracle Linux 8 VM that is running on an Oracle Linux 8 physical host to perform as a hypervisor, and host its own VMs. Note: On AMD64 systems, nested KVM virtualization continues to be a Technology Preview. virt-manager application deprecated; Oracle recommends using the Cockpit web console to manage virtualization in a GUI. Cockpit Web Console Cockpit web console login timeout; web console sessions will be automatically logged out after 15 minutes of inactivity Option for logging into the web console with a TLS client certificate added Creating a new file system in the web console requires a specified mount point Virtual Machines management page improvements Important changes in this release UEK R6 brought back support for Btrfs and OCFS2 file systems. These are not available while using the Red Hat Compatible Kernel (RHCK). Further Information on Oracle Linux 8 For more details about these and other new features and changes, please consult the Oracle Linux 8 Update 2 Release Notes and Oracle Linux 8 Documentation. Oracle Linux can be downloaded, used, and distributed free of charge and all updates and errata are freely available. Customers decide which of their systems require a support subscription. This makes Oracle Linux an ideal choice for development, testing, and production systems. The customer decides which support coverage is best for each individual system while keeping all systems up to date and secure. Customers with Oracle Linux Premier Support also receive support for additional Linux programs, including Gluster Storage, Oracle Linux Software Collections, and zero-downtime kernel updates using Oracle Ksplice. Application Compatibility Oracle Linux maintains user-space compatibility with Red Hat Enterprise Linux (RHEL), which is independent of the kernel version that underlies the operating system. Existing applications in user space will continue to run unmodified on the Unbreakable Enterprise Kernel Release 6 (UEK R6) and no re-certifications are needed for RHEL certified applications. For more information about Oracle Linux, please visit www.oracle.com/linux.

Oracle is pleased to announce the general availability of Oracle Linux 8 Update 2. Individual RPM packages are available on the Unbreakable Linux Network (ULN) and the Oracle Linux yum server. ISO...

Announcements

NTT Data Intellilink - Powering Mission Critical Workloads with Oracle Linux

This article highlights customer NTT Data Intellilink and their use of Oracle Linux. As an NTT DATA group company, they aim to provide value for their customers through design, implementation and operation of mission-critical information and communication systems platform built with the latest technologies. Within NTT Data Intellilink, there is a business unit which focuses on providing customers with Oracle solutions, support, and implementation services using a wide range of Oracle products such as Oracle Database, Oracle Fusion Middleware, Oracle Linux, and Oracle Engineered Systems. These solutions are deployed on premise or in Oracle Cloud. Previously, NTT Data Intellilink had been using Red Hat Enterprise Linux before switching to Oracle Linux with the Unbreakable Enterprise Kernel (UEK). This change resulted in multiple benefits which they speak about in this video. These include optimized workload performance, improved support across the entire stack, increased security, and lowering costs by 50% overall. NTT Data Intellilink also found that Oracle's flexible support contracts were easier to manage. Additionally, NTT Data Intellilink has improved its systems management experience by leveraging Oracle Enterprise Manager and Oracle Ksplice across its portfolio. Ksplice, zero-downtime patching, allows patches and critical bug fixes to be applied without taking systems down. Both are included at no additional cost with Oracle Linux Premier Support. We are proud to enable customers like NTT Data Intellilink to deliver mission-critical systems at a lower cost. Watch this video to learn more!

This article highlights customer NTT Data Intellilink and their use of Oracle Linux. As an NTT DATA group company, they aim to provide value for their customers through design, implementation...

Announcements

Staying Ahead of Cyberthreats: Protecting Your Linux Systems with Oracle Ksplice

In this recently published white paper, "Staying Ahead of Cyberthreats: Protecting Your Linux Systems with Oracle Ksplice," we explain why regular operating system patching is so important and how Oracle Ksplice can help better protect your Linux systems. In the face of increasingly sophisticated cyberthreats, protecting IT systems has become vitally important. To help administrators more easily and regularly apply Linux updates, Oracle Ksplice offers an automated zero-downtime solution that simplifies the patching process. Ksplice allows users to automate patching of the Linux kernel, both Xen and KVM hypervisors, and critical user space libraries. It is currently the only solution to offer user space patching. Ksplice also offers several other customer benefits, which are explained in the white paper. Additionally, you will find links to customer videos that highlight the value Ksplice is providing in production environments. Customers with an Oracle Linux Premier Support subscription have access to Ksplice at no additional cost. It is available for both on premise and cloud deployments. We hope you have a chance to learn more by reading the white paper and listening to what customers are saying about Ksplice.  

In this recently published white paper, "Staying Ahead of Cyberthreats: Protecting Your Linux Systems with Oracle Ksplice," we explain why regular operating system patching is so important and how...

Announcements

Announcing the release of Oracle Linux 7 Security Technical Implementation Guide (STIG) OpenSCAP profile

On February 28 2020, the Defence Information Systems Agency (DISA) released the Oracle Linux 7 Security Technical Implementation Guide (STIG) Release 1 Version 1 (R1V1). Oracle has implemented the published STIG in Security Content Automation Protocol (SCAP) format and included it in the latest release of the scap-security-guide package for Oracle Linux 7. This can be used in conjunction with the OpenSCAP tool shipped with Oracle Linux to validate a server against the published implementation guide. The validation process can also suggest and in some cases automatically apply remediation in cases where compliance is not met. Running a STIG compliance scan with OpenSCAP To validate a server against the published profile, you will need to install the OpenSCAP scanner tool and the SCAP Security Guide content: # yum install openscap scap-security-guide Loaded plugins: ovl, ulninfo Resolving Dependencies --> Running transaction check ---> Package openscap.x86_64 0:1.2.17-9.0.3.el7 will be installed ... Dependencies Resolved =============================================================================================================================== Package Arch Version Repository Size =============================================================================================================================== Installing: openscap x86_64 1.2.17-9.0.3.el7 ol7_latest 3.8 M scap-security-guide noarch 0.1.46-11.0.2.el7 ol7_latest 7.9 M Installing for dependencies: libxslt x86_64 1.1.28-5.0.1.el7 ol7_latest 241 k openscap-scanner x86_64 1.2.17-9.0.3.el7 ol7_latest 62 k xml-common noarch 0.6.3-39.el7 ol7_latest 26 k Transaction Summary =============================================================================================================================== Install 2 Packages (+3 Dependent packages) ... Installed: openscap.x86_64 0:1.2.17-9.0.3.el7 scap-security-guide.noarch 0:0.1.46-11.0.2.el7 ... Complete! To confirm you have the STIG profile available, run: # oscap info --profile stig /usr/share/xml/scap/ssg/content/ssg-ol7-xccdf.xml Document type: XCCDF Checklist Profile Title: DISA STIG for Oracle Linux 7 Id: stig Description: This profile contains configuration checks that align to the DISA STIG for Oracle Linux V1R1. To start an evaluation of the host against the profile, run: # oscap xccdf eval --profile stig \ --results /tmp/`hostname`-ssg-results.xml \ --report /var/www/html/`hostname`-ssg-results.html \ --cpe /usr/share/xml/scap/ssg/content/ssg-ol7-cpe-dictionary.xml \ /usr/share/xml/scap/ssg/content/ssg-ol7-xccdf.xml WARNING: This content points out to the remote resources. Use `--fetch-remote-resources' option to download them. WARNING: Skipping https://linux.oracle.com/security/oval/com.oracle.elsa-all.xml.bz2 file which is referenced from XCCDF content Title Remove User Host-Based Authentication Files Rule no_user_host_based_files Result pass Title Remove Host-Based Authentication Files Rule no_host_based_files Result pass Title Uninstall rsh-server Package Rule package_rsh-server_removed Result pass ... The results will be saved to /tmp/hostname-ssg-results.xml and a human-readable report will be saved to /var/www/html/hostname-ssg-results.html as well. For further details on additional options for running OpenSCAP compliance checks, including ways to generate a full security guide from SCAP content, please see the Oracle Linux 7 Security Guide. For details on methods to automate OpenSCAP scanning using Spacewalk, please see the Spacewalk for Oracle Linux: Client Life Cycle Management Guide. For community-based support, please visit the Oracle Linux space on the Oracle Groundbreakers Community.

On February 28 2020, the Defence Information Systems Agency (DISA) released the Oracle Linux 7 Security Technical Implementation Guide (STIG) Release 1 Version 1 (R1V1). Oracle has implemented the...

Announcements

Announcing Oracle Linux Cloud Native Environment Release 1.1

Oracle is pleased to announce the general availability of Oracle Linux Cloud Native Environment Release 1.1. This release includes several new features for cluster management, updates to the existing Kubernetes module, and introduces new Helm and Istio modules. Oracle Linux Cloud Native Environment is an integrated suite of software and tools for the development and management of cloud-native applications. Based on the Open Container Initiative (OCI) and Cloud Native Computing Foundation (CNCF) standards, Oracle Linux Cloud Native Environment delivers a simplified framework for installations, updates, upgrades, and configuration of key features for orchestrating microservices. New features and notable changes Several improvements and enhancements have been made to the installation and management of Oracle Linux Cloud Native Environment, including: Cluster installation: the olcnectl module install command automatically installs and configures any required RPM packages and services. Load balancer installation: the olcnectl module install command automatically deploys a software load balancer when the --virtual-ip parameter is provided. Cluster upgrades: the olcnectl module update command can update module components. For multi-master deployments, this is done with no cluster service downtime. Cluster scaling: the olcnectl module update command can add and remove both master and worker nodes in a running cluster.  Updated Kubernetes module Oracle Linux Cloud Native Environment Release 1.1 includes Kubernetes Release 1.17.4. Please review the Release Notes for a list of the significant administrative and API changes between Kubernetes 1.14.8 and 1.17. New Helm module Helm is a package manager for Kubernetes that simplifies the task of deploying and managing software inside Kubernetes clusters. In this release, the Helm module is not supported for general use but is required and supported to deploy the Istio module. New Istio module Istio is a fully featured service mesh for deploying microservices into Kubernetes clusters. Istio can handle most aspects of microservice management, including identity, authentication, transport security, and metric scraping. The Istio module includes embedded instances of the Prometheus monitoring and Grafana graphing tools which are automatically configured with specific dashboards to better understand Istio-managed workloads. For more information about installing and using the Istio module, see Service Mesh. Installation and upgrade Oracle Linux Cloud Native Environment is installed using packages from the Unbreakable Linux Network or the Oracle Linux yum server as well as container images from the Oracle Container Registry. Existing deployments can be upgraded in place using the olcnectl module update command. For more information on installing or upgrading Oracle Linux Cloud Native Environment, please see Getting Started. Support for Oracle Linux Cloud Native Environment Support for Oracle Linux Cloud Native Environment is included with an Oracle Linux Premier Support subscription. Documentation and training Oracle Linux Cloud Native Environment documentation Oracle Linux Cloud Native Environment training

Oracle is pleased to announce the general availability of Oracle Linux Cloud Native Environment Release 1.1. This release includes several new features for cluster management, updates to the existing...

Linux

What’s new for NFS in Unbreakable Enterprise Kernel Release 6?

Oracle Linux kernel engineer Calum Mackay provides some insight into the new features for NFS in release 6 of the Unbreakable Enterprise Kernel (UEK).   UEK R6 is based on the upstream long-term stable Linux kernel v5.4, and introduces many new features compared to the previous version UEK R5, which is based on the upstream stable Linux kernel v4.14. In this blog, we look at what has been improved in the UEK R6 NFS client & server implementations. Server-side Copy (NFSv4.2 clients & servers) UEK R6 adds initial experimental support for parts of the NFSv4.2 server-side copy (SSC) mechanism. This is a feature that considerably increases efficiency when copying a file between two locations on a server, via NFS. Without SSC, this operation requires that the NFS client use READ requests to read all the file's data, then WRITE requests to write it back to the server as a new file, with every byte travelling over the network twice. With SSC, the NFS client may use one of two new NFSv4.2 operations to ask the server to perform the copy locally, on the server itself, without the file data needing to traverse the network at all. Obviously this will be enormously faster. 1. NFS COPY NFS COPY is a new operation which can be used by the client to request that the server locally copy a range of bytes from one file to another, or indeed the entire file. However, NFS COPY requires use of the copy_file_range client system call. Currently, no bundled utilities in Linux distributions appear to make use of this system call, but an application may easily be written or converted to use it. As soon as support for the copy_file_range client system call is added to client utilities, they will be able to make use of the NFSv4.2 COPY operation. Note that NFS COPY does not require any special support within the NFS server filesystem itself. 2. NFS_CLONE The new NFS CLONE operation allows clients to ask the server to use the exported filesystem's reflink mechanism to create a copy-on-write clone of the file, elsewhere within the same server filesystem. NFS CLONE requires the use of client utilities that support reflink; currently cp includes this support, with its --reflink option. In addition, NFS CLONE requires that the NFS server filesystem supports the reflink operation. The filesystems available in Oracle Linux NFS servers that support the reflink operation are btrfs, OCFS2 & XFS. NFS CLONE is much faster even than NFS COPY, since it uses copy-on-write, on the NFS server, to clone the file, provided the source and destination files are within the same filesystem. Note that in some cases the server filesystem may need to have been originally created with reflink support, especially if they were created on Oracle Linux 7 or earlier. The NFSv4.2 SSC design specifies both intra-server and inter-server operations. UEK R6 supports intra-server operations, i.e. the source and destination files exist on the same NFS server. Support for inter-server SSC (copies between two NFS servers) will be added in the future. Use of these features requires that both NFS client and server support NFSv4.2 SSC; currently server support for SSC is only available with Linux NFS servers. As an example of the performance gains possible with NFSv4.2 SSC, here's an example copying a 2GB file between two locations on an NFS server, over a relatively slow network:   .divTable { display: table; width: 100%; } .divTableRow { display: table-row; } .divTableHeading { display: table-header-group; background-color: #ddd; font-weight: bold; } .divTableCell { display: table-cell; padding: 3px 10px; border: 1px solid #999999; } Method Time Traditional NFS READ/WRITE 5 mins 22 Seconds NFSv4.2 COPY (via custom app using copy_file_range syscall) 12 Seconds   SSC is specific to NFS version 4.2 or greater. In Oracle Linux 7, NFSv4.2 is supported (provided the latest UEK kernel and userland packages are installed), but it is not the default NFS version used by an NFS client when mounting filesystems. By default, an OL7 NFS client will mount using NFSv4.1 (provided the NFS server supports it). An NFSv4.2 mount may be performed on an OL7 client, as follows: # command line mount -o vers=4.2 server:/export /mnt # /etc/fstab server:/export /mnt nfs noauto,vers=4.2 0 0 An Oracle Linux 8 NFS client will mount using NFSv4.2 by default. Just like OL7, if the NFS server does not support that, the OL8 client will try to successively lower NFS versions until it finds one that the server supports. Multiple TCP connections per NFS server (NFSv4.1 and later clients) For NFSv4.1 and later mounts over TCP, a new nconnect mount option enables an NFS client to set up multiple TCP connections, using the same client network interface, to the same NFS server. This may improve total throughput in some cases, particularly with bonded networks. Multiple transports allow hardware parallelism on the network path to be fully exploited. However, there are also improvements even using just one NIC; thanks to various efficiency savings. Using multiple connections will help most when a single TCP connection is saturated while the network itself and the server still has capacity. It will not help if the network itself is saturated, and it will still be bounded by the performance of the storage at the NFS server. Enhanced statistics reporting has been added to report on all transports when using multiple connections. Improved handling of soft mounts (NFSv4 clients) NOTE: we do not recommend the use of the soft and rw mount options together (and remember that rw is the default) unless you fully understand the implications, including possible data loss or corruption. By default, i.e. without the soft mount option, NFS mounts are described as hard, which means that NFS operations will not timeout in the case of an unresponsive NFS server, or network partition. NFS operations, including READ and WRITE, will wait indefinitely, until the NFS server is again reachable. In particular, this means that any such affected NFS filesystem cannot be unmounted, and the NFS client system itself cannot be cleanly shutdown, until the NFS server responds. When an NFS filesystem is mounted with the soft mount option, NFS operations will timeout after a certain period (based on the timeo and retrans mount options) and the associated system calls (e.g. read, write, fsync, etc) will return an EIO error to the application. The NFS filesystem may be unmounted, and the NFS client system may be cleanly shutdown. This might sound like a useful feature, but it can cause problems, which can be especially severe in the case of rw (read-write) filesystems, because of the following: Client applications often don't expect to get EIO from file I/O request system calls, and may not handle them appropriately. NFS uses asynchronous I/O which means that the first client write system call isn't necessarily going to return the error, which may instead get reported by a subsequent write, or close, or perhaps only by a subsequent fsync, which the client might not even perform; close may not be guaranteed to report the error, either. Obviously, reporting the error via a subsequent write/fsync makes it harder for the application to deal with correctly. Write interleaving may mean that the NFS client kernel can't always precisely track which file descriptors are involved, so the error may perhaps not even be guaranteed to be delivered, or not delivered via the right descriptor on close/fsync. It's important to realize that the above issues may result in NFS WRITE operations being lost, when using the soft mount option, resulting in file corruption and data loss, depending on how well the client application handles these situations. For that reason, it is dangerous to use the soft mount option with rw mounted filesystems, even with UEK R6, unless you are fully aware of how your application(s) handle EIO errors from file I/O request system calls. In UEK R6, the handling of soft mounts with NFSv4 has been improved, in particular: Reducing the risk of false-positive timeouts, e.g. in the case where the NFS server is merely congested. Faster failover of NFS READ and WRITE operations after a timeout. Better association of errors with process/fd. A new optional additional softerr mount option to return ETIMEDOUT (instead of EIO) to the application after a timeout, so that applications written to be aware of this may better differentiate between the the timeout case, e.g. to drive a failover response, and other I/O errors, so that the client application may choose a different recovery action for those cases. Mounts using only the soft mount option will see the other improvements, but timeout errors will still be returned to the application with the EIO error. General improvements will still benefit to an extent existing applications not written specifically to deal with ETIMEDOUT/EIO using the soft mount option with NFSv4, as follows: The client kernel will give the server longer to reply, without returning EIO to the application, as long as the network connection remains connected, for example if the server is badly congested. Swifter handling of real timeouts, and better correlation of error to process file descriptor. Be aware that the same caveats still apply: it's still dangerous to use soft with rw mounts unless you fully understand the implications, and all client applications are correctly written to handle the issues. If you are in any doubt about whether your applications behave correctly in the face of EIO & ETIMEDOUT errors, do not use soft rw mounts. New knfsd file descriptor cache (NFSv3 servers) UEK R6 NFSv3 servers benefit from a new knfsd file descriptor cache, so that the NFS server's kernel doesn't have to perform internal open and close calls for each NFSv3 READ or WRITE. This can speed up I/O in some cases. It also replaces the readahead cache. When an NFSv3 READ or WRITE request comes in to an NFS server, knfsd initially opens a new file descriptor, then it perform the read/write, and finally it closes the fd. While this is often a relatively inexpensive thing to do for most local server filesystems, it is usually less so for FUSE, clustered, networked and other filesystems with a slow open routine, that are being exported by knfsd. This improvement attempts to reduce some of that cost by caching open file descriptors so that they may be reused by other incoming NFSv3 READ/WRITE requests for the same file. Performance General Much work has been done to further improve the performance of NFS & RPC over RDMA transports. The performance of RPC requests has been improved, by removing BH (bottom-half soft IRQ) spinlocks. NFS clients Optimization of the default readahead size, to suit modern NFS block sizes and server disk latencies. RPC client parallelization optimizations. Performance optimizations for NFSv4 LOOKUP operations, and delegations, including not unnecessarily returning NFSv4 delegations, and locking improvements. Support the statx mask & query flags to enable optimizations when the user is requesting only attributes that are already up to date in the inode cache, or is specifying AT_STATX_DONT_SYNC. NFS servers Remove the artificial limit on NFSv4.1 performance by limiting the number of oustanding RPC requests from a single client. Increase the limit of concurrent NFSv4.1 clients, i.e. stop a few greedy clients using up all the NFS server's session slots. Diagnostics To improve debugging and diagnosibility, a large number of ftrace events have been added. Work to follow will include having a subset of these events optionally enabled during normal production, to aid fix on first occurrence without adversely impacting performance. Expose information about NFSv4 state held by servers on behalf of clients. This is especially important for NFSv4 OPEN calls, which are currently invisible to user space on the server, unlike locks (/proc/locks) and local processes' opens (/proc/pid/). A new directory (/proc/fs/nfsd/clients/) is added, with subdirectories for each active NFSv4 client. Each subdirectory has an info file with some basic information to help identify the client and a states/ directory that lists the OPEN state held by that client. This also allows forced revocation of client state. (NFSv3/NLM) Cleanup and modify lock code to show the pid of lockd as the owner of NLM locks. Miscellaneous NFS clients Finer-grained NFSv4 attribute checking. For NFS mounts over RDMA, the port=20049 (sic) mount option is now the default. NFS servers Locking and data structure improvements for duplicate request cache (DRC) and other caches. Improvements for running NFS servers in containers, including replacing the global duplicate reply cache with separate caches per network namespace; it is now possible to run separate NFS server processes in each network namespace, each with their own set of exports. NFSv3 clients and servers Improved handling of correctness and reporting of NFS WRITE errors, on both NFSv3 clients and servers. This is especially important given that NFS WRITE operations are generally done asynchronously to application write system calls. Summary In this blog we've looked at the changes and new features relating to NFS & RPC, for both clients and servers available in the latest Unbreakable Enterprise Kernel Release 6.

Oracle Linux kernel engineer Calum Mackay provides some insight into the new features for NFS in release 6 of the Unbreakable Enterprise Kernel (UEK).   UEK R6 is based on the upstream long-term stable...

Announcements

Downloading Oracle Linux ISO Images

Updated to incorporate new download options and changes in Software Delivery Cloud This post summarizes options to download Oracle Linux installation media Introduction There are several types of downloads: Full ISO image: contains everything needed to boot a system and install Oracle Linux. This is the most common download. UEK Boot ISO image: contains everything that is required to boot a system with Unbreakable Enterprise Kernel (UEK) and start an installation Boot ISO image: contains everything that is required to boot a system with Red Hat compatible kernel (RHCK) and start an installation Source DVDs ISO image: ISO images containing all the source RPMs for Oracle Linux Other types of images: Depending on the release of Oracle Linux, there are optional ISO images with additional drivers, etc. See also the documentation for Oracle Linux 7 and Oracle Linux 8 for more details on obtaining and preparing installation media. Download Oracle Linux from Oracle Linux Yum Server If all you need is an ISO image to perform an installation of a recent Oracle Linux release, your best bet is to download directly from Oracle Linux yum server. From here you can directly download full ISO images and boot ISO images for the last few updates of Oracle Linux 8, 7 and 6 for both x86_64 and Arm (aarch64). No registration or sign in required. Start here. Download from Oracle Software Delivery Cloud Oracle Sofware Delivery Cloud is the official source to download all Oracle software, including Oracle Linux. Unless you are looking for older releases of Oracle Linux or complementary downloads other than the regular installation ISO, it’s probably quicker and easier download from Oracle Linux yum server. That said, to download from Oracle Sofware Delivery Cloud, start here and sign in. Choose one of the following methods to obtain your product: If your product is included in the Popular Downloads window, then select that product to add it to the cart. If your product is not included in the Popular Downloads window, then do the following: Type “Oracle Linux 7” or “Oracle Linux 8” in the search box, then click Search. From the search results list, select the product you want to download to add it to the cart. Note that for these instructions, there is no difference between a Release (REL) and a Download Package (DLP). Click Checkout. From the Platform/Languages drop-down list, select your system’s platform, then Continue. On the next page, review and accept the terms of licenses, then click Continue. Next, you have several options to download the files you are interested in. Directly by Clicking on the File Link If you only need one or two of the files and don’t anticipate any download hiccups that require stopping and resuming a download, simply click on the filename, e.g. V995537-01.iso   Image showing how to download a single file   Using a Download Manager Use a download manager if you want to download multiple files at the same time or pause and resume file download. A Download manager can come in handy when you are having trouble completing a download, or want to queue up several files for unattended downloading. Remember to de-select any files you are not interested in. Image of download manager   Using wget If want to download directly to a system with access to a command line, only, use the WGET option to download a shell script. Download from Unofficial Mirrors In addition locations listed above Oracle Linux ISOs can be download from several unoffical mirror sites. Note that these site are not endorsed by Oracle, but that you can verify the downloaded files using the procedure outlined below. Remember to Verify Oracle Linux downloads can be verified to ensure that they are exactly the downloads as published by Oracle and that they were downloaded without any corruption. For checksum files, signing keys and steps to verify the integrity of your downloads, see these instructions. Downloading Oracle Linux Source Code To download Oracle Linux source code, use the steps described under Download from Oracle Software Delivery Cloud to onbtain Source DVD ISOs. Alternatively, you can find individual source RPMs on oss.oracle.com/sources or Oracle Linux yum server

Updated to incorporate new download options and changes in Software Delivery Cloud This post summarizes options to download Oracle Linux installation media Introduction There are several types of...

Announcements

Announcing the release of Oracle Linux 7 Update 8

Oracle is pleased to announce the general availability of Oracle Linux 7 Update 8. Individual RPM packages are available on the Unbreakable Linux Network (ULN) and the Oracle Linux yum server. ISO installation images will soon be available for download from the Oracle Software Delivery Cloud and Docker images are available via Oracle Container Registry and Docker Hub. Oracle Linux 7 Update 8 ships with the following kernel packages, which include bug fixes, security fixes and enhancements: Unbreakable Enterprise Kernel (UEK) Release 5 for x86-64 and aarch64 kernel-uek-4.14.35-1902.300.11.el7uek Red Hat Compatible Kernel (RHCK) for x86-64 only kernel-3.10.0-1127.el7 Notable new features for all architectures Oracle Linux 7 Update 8 ISO includes latest Unbreakable Kernel Release 5 Update 3 "Unbreakable Kernel Release 6" available by Oracle Linux 7 Yum channel SELinux enhancements for Tomcat domain access and graphical login sessions rsyslog has a new option for managing letter-case preservation by using the FROMHOST property for the imudp and imtcp modules Pacemaker concurrent-fencing cluster property defaults to true, speeding up recovery in a large cluster where multiple nodes are fenced Further information are available in the Release Notes for Oracle Linux 7 Update 8. Application Compatibility Oracle Linux maintains user space compatibility with Red Hat Enterprise Linux (RHEL), which is independent of the kernel version that underlies the operating system. Existing applications in user space will continue to run unmodified on Oracle Linux 7 Update 8 with UEK Release 5 and no re-certifications are needed for applications already certified with Red Hat Enterprise Linux 7 or Oracle Linux 7. About Oracle Linux The Oracle Linux operating environment delivers leading performance, scalability and reliability for business-critical workloads deployed on premise or in the cloud. Oracle Linux is the basis of Oracle Autonomous Linux and runs Oracle Gen 2 Cloud. Unlike many other commercial Linux distributions, Oracle Linux is easy to download and completely free to use, distribute, and update. Oracle Linux Support offers access to award-winning Oracle support resources and Linux support specialists; zero-downtime updates using Ksplice; additional management tools such as Oracle Enterprise Manager and Spacewalk; and lifetime support, all at a low cost. For more information about Oracle Linux, please visit www.oracle.com/linux.

Oracle is pleased to announce the general availability of Oracle Linux 7 Update 8. Individual RPM packages are available on the Unbreakable Linux Network (ULN) and the Oracle Linux yum server....

Announcements

Announcing Oracle Linux Virtualization Manager 4.3

Oracle is pleased to announce the general availability of Oracle Linux Virtualization Manager, release 4.3. This server virtualization management platform can be easily deployed to configure, monitor, and manage an Oracle Linux Kernel-based Virtual Machine (KVM) environment with enterprise-grade performance and support from Oracle. This release is based on the 4.3.6 release of the open source oVirt project. New Features with Oracle Linux Virtualization Manager 4.3 In addition to the base virtualization management features required to operate your data center, notable features added with the Oracle Linux Virtualization Manager 4.3 release include: Self-Hosted Engine: The oVirt Self-Hosted Engine is a hyper-converged solution in which the oVirt engine runs on a virtual machine on the hosts managed by that engine. The virtual machine is created as part of the host configuration, and the engine is installed and configured in parallel to the host configuration process. The primary benefit of the Self-Hosted Engine is that it requires less hardware to deploy an instance of the Oracle Linux Virtualization Manager as the engine runs as a virtual machine, not on physical hardware. Additionally, the engine is configured to be highly available. If the Oracle Linux host running the engine virtual machine goes into maintenance mode, or fails unexpectedly, the virtual machine will be migrated automatically to another Oracle Linux host in the environment. Gluster File System 6.0: oVirt has been integrated with GlusterFS, an open source scale-out distributed filesystem, to provide a hyper-converged solution where both compute and storage are provided from the same hosts. Gluster volumes residing on the hosts are used as storage domains in oVirt to store the virtual machine images. Oracle Linux Virtualization Manager is run as the Self Hosted Engine within a virtual machine on these hosts. GlusterFS 6.0 is released as an Oracle Linux 7 program. Virt-v2v: The virt-v2v tool converts a single guest from another hypervisor to run on Oracle Linux KVM. It can read Linux and Windows Virtual Machines running on Oracle VM or other hypervisors, and convert them to KVM machines managed by Oracle Linux Virtualization Manager. New guest OS support: Oracle Linux Virtualization Manager guest operating system support has been extended to include Oracle Linux 8, Red Hat Enterprise Linux 8, CentOS 8, SUSE Linux Enterprise Server (SLES) 12 SP5 and SLES 15 SP1. oVirt 4.3 features and bug fixes: Improved performance when running Windows as a guest OS. Included with this release are the latest Oracle VirtIO Drivers for Microsoft Windows. Higher level of security with TLSv1 and TLSv1.1 protocols now disabled for vdsm communications. Numerous engine, vdsm, UI, and bug fixes. More information on these features can be found in the Oracle Linux Virtualization Manager Document Library which has been updated for this release. Visit the Oracle Linux Virtualization Manager Training website for videos, documents, other useful links, and further information on setting up and managing this solution. Oracle Linux Virtualization Manager allows enterprise customers to continue supporting their on-premise data center deployments with the KVM hypervisor available on Oracle Linux 7 Update 7 with the Unbreakable Enterprise Kernel Release 5. This 4.3 release is an update release for Oracle Linux Virtualization Manager 4.2. Getting Started Oracle Linux Virtualization Manager 4.3 can be installed from the Oracle Linux yum server or the Oracle Unbreakable Linux Network. Customers that have already deployed Oracle Linux Virtualization Manager 4.2 can upgrade to 4.3 using these same sites. Two new channels have been created in the Oracle Linux 7 repositories that users will access to install or update Oracle Linux Virtualization Manager: oVirt 4.3 - base packages required for Oracle Linux Virtualization Manager oVirt 4.3 Extra Packages - additional packages for Oracle Linux Virtualization Manager Oracle Linux 7 Update 7 hosts can be installed with installation media (ISO images) available from the Oracle Software Delivery Cloud. Step-by-step instructions to download the Oracle Linux 7 Update 7 ISO can be found on the Oracle Linux Community website. Using the "Minimal Install" option during the installation process sets up a base KVM system which can then be updated using the KVM Utilities channel in the Oracle Linux 7 repositories. These KVM enhancements and other important packages for your Oracle Linux KVM host can be installed from the Oracle Linux yum server and the Oracle Unbreakable Linux Network: Latest - Latest packages released for Oracle Linux 7 UEK Release 5 - Latest Unbreakable Enterprise Kernel Release 5 packages for Oracle Linux 7 KVM Utilities - KVM enhancements (QEMU and libvirt) for Oracle Linux 7 Optional Latest - Latest optional packages released for Oracle Linux 7 Gluster 6 Packages - Latest Gluster 6 packages for Oracle Linux 7 Both Oracle Linux Virtualization Manager and Oracle Linux can be downloaded, used, and distributed free of charge and all updates and errata are freely available. Oracle Linux Virtualization Manager Support Support for Oracle Linux Virtualization Manager is available to customers with an Oracle Linux Premier Support subscription. Refer to Oracle Linux 7 License Information User Manual for information about Oracle Linux support levels. Oracle Linux Virtualization Manager Resources Oracle Linux Resources Oracle Virtualization Resources Oracle Linux yum server Oracle Linux Virtualization Manager Training

Oracle is pleased to announce the general availability of Oracle Linux Virtualization Manager, release 4.3. This server virtualization management platform can be easily deployed to configure, monitor,...

Linux

Oracle Linux Learning Library: Start On a Video Path Now

The Oracle Linux Learning Library provides you learning paths that are adapted to different environments and infrastructures. These free video based learning paths permit you to start training at any time, from anywhere and to advance at your own pace. Learning paths are enhanced on an ongoing basis. Get started today on the learning path that suits your needs and interests: Linux on Oracle Cloud Infrastructure: See how to use Linux to deliver powerful compute and networking performance with a comprehensive portfolio of infrastructure and platform cloud services. Oracle Linux Cloud Native Environment: Learn how you can deploy the software and tools to develop microservices-based applications in-line with open standards and specifications. Oracle Linux 8: This learning path is being built out so you can develop skills to use Linux on Oracle Cloud Infrastructure, on-premise, or on other public clouds. Become savvy on this operating system that is free to use, free to distribute, free to update and easy to download. Oracle Linux Virtualization Manager: Use resources available to adopt this open-source distributed server virtualization solution. Gain proficiency in deploying, configuring, monitoring, and managing an Oracle Linux Kernel-based Virtual Machine (KVM) environment with enterprise-grade performance. Resources: Oracle Linux product documentation Oracle Cloud Infrastructure product documentation Oracle Linux Virtualization Manager product documentation  

The Oracle Linux Learning Library provides you learning paths that are adapted to different environments and infrastructures. These free video based learning paths permit you to start training at any...

Announcements

Announcing the Unbreakable Enterprise Kernel Release 6 for Oracle Linux

Oracle is pleased to announce the general availability of the Unbreakable Enterprise Kernel Release 6 for Oracle Linux. The Unbreakable Enterprise Kernel (UEK) for Oracle Linux provides the latest open source innovations and business-critical performance and security optimizations for cloud and on-premise deployment. It is the Linux kernel that powers Oracle Gen 2 Cloud and Oracle Engineered Systems such as Oracle Exadata Database Machine. Oracle Linux with UEK is available on the x86-64 and 64-bit Arm (aarch64) architectures.   Notable UEK6 new features and enhancements: Linux 5.4 kernel: Based on the mainline Linux kernel version 5.4, this release includes many upstream enhancements. Arm: Enhanced support for the Arm (aarch64) platform, including improvements in the areas of security and virtualization. Cgroup v2: Cgroup v2 functionality was first introduced in UEK R5 to enable the CPU controller functionality. UEK R6 includes all Cgroup v2 features, along with several enhancements. ktask: ktask is a framework for parallelizing CPU-intensive work in the kernel. It can be used to speed up large tasks on systems with available CPU power, where a task is single-threaded in user space. Parallelized kswapd: Page replacement is handled in the kernel asynchronously by kswapd, and synchronously by direct reclaim. When free pages within the zone free list are low, kswapd scans pages to determine if there are unused pages that can be evicted to free up space for new pages. This optimization improves performance by avoiding direct reclaims, which can be resource intensive and time consuming. Kexec firmware signing: The option to check and validate a kernel image signature is enabled in UEK R6. When kexec is used to load a kernel from within UEK R6, kernel image signature checking and validation can be implemented to ensure that a system only loads a signed and validate kernel image. Memory management: Several performance enhancements have been implemented in the kernel's memory management code to improve the efficiency of clearing pages and cache, as well as enhancements to fault management and reporting. NVDIMM: NVDIMM feature updates have been implemented so that persistent memory can be used as traditional RAM. DTrace: DTrace support is enabled and has been re-implemented to use the Berkeley Packet Filter (BPF) that is integrated into the Linux kernel. OCFS2: Support for the OCFS2 file system is enabled. Btrfs: Support for the Btrfs file system is enabled and support to select Btrfs as a file system type when formatting devices is available Important UEK6 changes in this release: The following sections describe the important changes in the Unbreakable Enterprise Kernel Release 6 (UEK R6) relative to UEK R5. Core Kernel Functionality High-performance asynchronous I/O with io_uring: The io_uring is a fast, scalable asynchronous I/O interface for both buffered and unbuffered I/Os. It also supports asynchronous polled I/O. A user space library, liburing, provides basic functionality for applications with helpers to allow applications to easily set up an io_uring instance and submit/complete I/O. NVDIMM: Persistent memory can now be used as traditional RAM. Furthermore fixes, were implemented around the security-related commands within libnvdimm that allowed the use of keys where payload data was filled with zero values to allow secure operations to continue to take place where a zero-key is in use. Cryptography Simplified key description management: Keys and keyrings are more namespace aware. Zstandard compression: Zstandard compression (zstd) is added to crypto and compress. Filesystems  Brtfs: Btrfs continues to be supported. Several improvements and patches have been applied in this update, including support for swap files, ZStandard compression, and various performance improvements. ext4: 64-bit timestamps have been added to the superblock fields. OCFS2: OCFS2 continues to be supported. Several improvements and patches have been applied in this update, including support for the 'nowait' AIO feature and support on Arm platforms. XFS: A new online health reporting infrastructure with user space ioctl provide metadata health status after online fsck. Added support for fallocate swap files and swap files on real-time devices. Various performance improvements have also been made. NFS: Performance improvements and enhancements have been made to RPC and the NFS client and server components. Memory Management TLB flushing code is improved to avoid unnecessary flushes and to reduce TLB shootdowns. Memory management is enhanced to improve throughput by leveraging clearing of huge pages more optimally. Page cache efficiency is improved by using the more efficient Xarray data type. Fragmentation avoidance algorithms are improved and compaction and defragmentation times are faster. Improvements have been implemented to the handling of Transparent Huge Page faults and to provide better reporting on Transparent Huge Page status. Networking TCP Early Departure Time: The TCP stack now uses the Early Departure Time model, instead of the As Fast As Possible model, for sending packets. This brings several performance gains as it resolves a limitation in the original TCP/IP framework, and introduces the scheduled release of packets, to overcome hardware limitations and bottlenecks. Generic Receive Offload (GRO): GRO is enabled for the UDP protocol. TLS Receive: UEK R5 enabled the kernel to send TLS messages. This release enables the kernel to also receive TLS messages. Zero-copy TCP Receive: UEK R5 introduced a zero-copy TCP feature for sending packets to the network. The UEK R6 release enables receive functionality for zero-copy TCP. Packet Filtering: nftables is now the default backend for firewall rules. BPF-based networking filtering (bpfilter) is also added in this release. Express data path (XDP): XDP is a flexible, minimal, kernel-based packet transport for high speed networking has been added. Security Lockdown mode: Lockdown mode is improved. This release distinguishes between the integrity and confidentiality modes. When Secure Boot is enabled in UEK R6, lockdown integrity mode is enforced by default. IBRS: Indirect Branch Restricted Speculation (IBRS) continues to be supported for processors that do not have built-in hardware mitigations for Speculative Execution Side Channel Vulnerabilities. Improved protection in world writable directories: UEK R6 discourages spoofing attacks by disallowing the opening of FIFOs or regular files not owned by the user in world writable sticky directories, such as /tmp. Arm KASLR: Kernel virtual address randomization is enabled by default for Arm platforms. aarch64 pointer authentication: Adds primitives that can be used to mitigate certain classes of memory stack corruption attacks on Arm platforms. Storage, Virtualization, and Driver Updates NVMe: NVMe over Fabrics TCP host and the target drivers have been added. Support for multi-path and passthrough commands has been added. VirtIO: The VirtIO PMEM feature adds a VirtIO-based asynchronous flush mechanism and simulates persistent memory to a guest, allowing it to bypass a guest page cache. A VirtIO-IOMMU para-virtualized driver is also added in this release, allowing IOMMU requests over the VirtIO transport without emulating page tables. Arm platform: Guests on Arm aarch64 platform systems include pointer authentication (ARM v8.3) and Scalable Vector Extension (SVE) support. Device drivers: UEK R6 supports a large number of hardware server platforms and devices. In close cooperation with hardware and storage vendors, Oracle has updated several device drivers from the versions in mainline Linux 5.4. A complete list of the driver modules/versions included in UEK R6 is provided in the Release Notes appendix, "Appendix B, Driver Modules in Unbreakable Enterprise Kernel Release 6 (x86_64)". Security (CVE) Fixes A full list of CVEs fixed in this release can be found in the Release Notes for the UEK R6. Supported Upgrade Path Customers can upgrade existing Oracle Linux 7 and Oracle Linux 8 servers using the Unbreakable Linux Network or the Oracle Linux yum server by pointing to "UEK Release 6" Yum Channel. Software Download Oracle Linux can be downloaded, used, and distributed free of charge and updates and errata are freely available. This allows organizations to decide which systems require a support subscription and makes Oracle Linux an ideal choice for development, testing, and production systems. The user decides which support coverage is the best for each system individually, while keeping all systems up-to-date and secure. Customers with Oracle Linux Premier Support also receive access to zero-downtime kernel updates using Oracle Ksplice. About Oracle Linux The Oracle Linux operating environment delivers leading performance, scalability and reliability for business-critical workloads deployed on premise or in the cloud. Oracle Linux is the basis of Oracle Autonomous Linux and runs Oracle Gen 2 Cloud. Unlike many other commercial Linux distributions, Oracle Linux is easy to download and completely free to use, distribute, and update. Oracle Linux Support offers access to award-winning Oracle support resources and Linux support specialists; zero-downtime updates using Ksplice; additional management tools such as Oracle Enterprise Manager and Spacewalk; and lifetime support, all at a low cost.

Oracle is pleased to announce the general availability of the Unbreakable Enterprise Kernel Release 6 for Oracle Linux. The Unbreakable Enterprise Kernel (UEK) for Oracle Linux provides the latest open...

Announcements

Announcing the Unbreakable Enterprise Kernel Release 5 Update 3 for Oracle Linux

The Unbreakable Enterprise Kernel (UEK) for Oracle Linux provides the latest open source innovations and key optimizations and security to enterprise cloud workloads. It is the Linux kernel that powers Oracle Cloud and Oracle Engineered Systems such as Oracle Exadata Database Machine as well as Oracle Linux on Intel-64, AMD-64 or ARM hardware. What's New? UEK R5 Update 3 is based on the mainline kernel version 4.14.35. Through actively monitoring upstream check-ins and collaboration with partners and customers, Oracle continues to improve and apply critical bug and security fixes to the Unbreakable Enterprise Kernel (UEK) R5 for Oracle Linux. This update includes several new features, added functionality, and bug fixes across a range of subsystems. UEK R5 Update 3 can be recognized with release number starting with 4.14.35-1902.300. Notable changes: 64-bit Arm (aarch64) Architecture. Significant improvements have been made to a number of drivers, through vendor contributions, for better support on embedded 64-bit Arm platforms. Core Kernel Functionality. UEK R5U3 provides equivalent core kernel functionality to UEK R5U2, making use of the same upstream mainline kernel release, with additional patches to enhance existing functionality and provide some minor bug fixes and security improvements. On-Demand Paging. On-Demand-Paging (ODP) is a virtual memory management technique to ease memory registration. File system and storage fixes.  XFS.  A deadlock bug that caused the file system to freeze lock and not release has been fixed. CIFS.  An upstream patch was applied to resolve an issue that could cause POSIX lock leakages and system crashes. Virtualization and QEMU. Minor bugfix for hardware incompatibility with QEMU.  A minor bugfix was applied to KVM code in line with upstream fixes that resolved a trivial testing issue with certain versions of QEMU on some hardware. Driver updates. In close cooperation with hardware and storage vendors, Oracle has updated several device drivers from the versions in mainline Linux 4.14.35; further updates are provided in the Appendix A (Driver Modules in Unbreakable Enterprise Kernel Release 5 Update 3) of the Release notes. For more details on these and other new features and changes, please consult the Release Notes for the UEK R5 Update 3. Security (CVE) Fixes A full list of CVEs fixed in this release can be found in the Release Notes for the UEK R5 Update 3. Supported Upgrade Path Customers can upgrade existing Oracle Linux 7 servers using the Unbreakable Linux Network or the Oracle Linux yum server by pointing to "UEK Release 5" Yum Channel. Software Download Oracle Linux can be downloaded, used, and distributed free of charge and all updates and errata are freely available. This allows organizations to decide which systems require a support subscription and makes Oracle Linux an ideal choice for development, testing, and production systems. The user decides which support coverage is the best for each system individually, while keeping all systems up-to-date and secure. Customers with Oracle Linux Premier Support also receive access to zero-downtime kernel updates using Oracle Ksplice. Compatibility UEK R5 Update 3 is fully compatible with the UEK R5 GA release. The kernel ABI for UEK R5 remains unchanged in all subsequent updates to the initial release. About Oracle Linux The Oracle Linux operating system is engineered for an open cloud infrastructure. It delivers leading performance, scalability and reliability for enterprise SaaS and PaaS workloads as well as traditional enterprise applications. Oracle Linux Support offers access to award-winning Oracle support resources and Linux support specialists; zero-downtime updates using Ksplice; additional management tools such as Oracle Enterprise Manager and Spacewalk; and lifetime support, all at a low cost. And unlike many other commercial Linux distributions, Oracle Linux is easy to download, completely free to use, distribute, and update. Oracle tests the UEK intensively with demanding Oracle workloads, and recommends the UEK for Oracle deployments and all other enterprise deployments. Resources – Oracle Linux Documentation Oracle Linux Software Download Oracle Linux Blogs Oracle Linux Blog Oracle Virtualization Blog Community Pages Oracle Linux Social Media Oracle Linux on YouTube Oracle Linux on Facebook Oracle Linux on Twitter Data Sheets, White Papers, Videos, Training, Support & more Oracle Linux Product Training and Education Oracle Linux - education.oracle.com/linux

The Unbreakable Enterprise Kernel (UEK) for Oracle Linux provides the latest open source innovations and key optimizations and security to enterprise cloud workloads. It is the Linux kernel that...

Linux

Connect PHP 7 to Oracle Database using packages from Oracle Linux Yum Server

Note: This post was updated to include the latest available release of PHP as well as simplified installation intstructions for Oracle Instant Client introduced starting with 19c.   We recently added PHP 7.4 to our repos on Oracle Linux yum server. These repos include also include the PHP OCI8 extenstion to connect your PHP applications to Oracle database. In this post I describe the steps to install PHP 7.4, PHP OCI8 and Oracle Instant Client on Oracle Linux to connect PHP to Oracle Database. For this blog post, I used a free Autonomous Database included in Oracle Cloud Free Tier. Install Oracle Instant Client Oracle Instant Client RPMs are available on Oracle Linux yum server also. To access them, install the oracle-release-el7 package first to setup the appropriate repositories:   $ sudo yum -y install oracle-release-el7 $ sudo yum -y install oracle-instantclient19.5-basic If you want to be able to use SQL*Plus (this can come in handy for some sanity checks), install the SQL*Plus RPM also: $ sudo yum -y install oracle-instantclient19.5-sqlplus Create a Schema and Install the HR Sample Objects (Optional) You can use any schema you already have in your database. I’m going to use the HR schema from the Oracle Database Sample Schemas on github.com If you already have a schema with database objects to work with, you can skip this step. $ yum -y install git $ git clone https://github.com/oracle/db-sample-schemas.git $ cd db-sample-schemas/human_resources As SYSTEM (or ADMIN, if you are using Autonomous Database), create a user PHPTEST SQL> grant connect, resource, create view to phptest identified by <YOUR DATABASE PASSWORD>; SQL> alter user PHPTEST quota 5m on USERS; If you are using Autonomous Database like I am, change the tablespace above to DATA: SQL> alter user phptest quota 5m on DATA; As the PHPTEST user, run the scripts hr_cre.sql and hr_popul.sql to create and populate the HR database objects SQL> connect phptest/<YOUR DATABASE PASSWORD>@<YOUR CONNECT STRING> SQL> @hr_cre.sql SQL> @hr_popul.sql Install PHP and PHP OCI8 To install PHP 7.4, make sure you have the latest oracle-php-release-el7 package installed first. $ sudo yum install -y oracle-php-release-el7 Next, install PHP and the PHP OCI8 extenstion corresponding to the Oracle Instant Client installed earlier: $ sudo yum -y install php php-oci8-19c Running the following php code snippet should verify that we can connect PHP to the database and bring back data. Make sure you replace the schema and connect string as appropriate. Create a file emp.php based on the code above. Run it! $ php emp.php This should produce the following: King Kochhar De Haan Hunold Ernst Austin Pataballa Lorentz Greenberg Faviet Chen Sciarra ...  

Note: This post was updated to include the latest available release of PHP as well as simplified installation intstructions for Oracle Instant Client introduced starting with 19c.   We recently added...

Announcements

Announcing Gluster Storage Release 6 for Oracle Linux

The Oracle Linux and Virtualization team is pleased to announce the release of Gluster Storage Release 6 for Oracle Linux, bringing customers higher performance, new storage capabilities and improved management. Gluster Storage is an open source, POSIX compatible file system capable of supporting thousands of clients while using commodity hardware. Gluster provides a scalable, distributed file system that aggregates disk storage resources from multiple servers into a single global namespace. Gluster provides built-in optimization for different workloads and can be accessed using an optimized Gluster FUSE client or standard protocols including SMB/CIFS. Gluster can be configured to enable both distribution and replication of content with quota support, snapshots, and bit-rot detection for self-healing. New Features Gluster Storage Release 6 introduces support for the following important capabilities: Gluster Geo-Replication: Geo-replication provides a continuous, asynchronous, and incremental replication service from one site to another over a LAN, WAN or across the Internet. Geo-replication uses a master–slave model, whereby replication and mirroring occurs: Master – the geo-replication source GlusterFS volume Slave – the geo-replication target GlusterFS volume Session - Unique identifier of Geo-replication session Differences between Replicated-volumes and Geo-replication:   Replicated Volumes Gluster Geo-Replication Mirrors data across clusters Mirrors data across geographically distributed clusters Provides high-availability Ensure backing up of data for disaster and recovery Synchronous Replication (each and every file operation is sent across all the bricks) A-synchronous Replication (checks for the changes in files periodically and syncs them upon detecting differences)   Support for Oracle Linux 8: Gluster Storage Release 6 for Oracle Linux introduced the support for Oracle Linux 8 with Red Hat Compatible Kernel, in addition to Oracle Linux 7 Gluster Storage Release 6 for Oracle Linux 8 has been build as an Application Stream Module named glusterfs; module profiles available are: Server Client An additional glusterfs-developer module is available as a technology preview and introduces the option to leverage gluster-ansible RPMS to automate gluster deployment and management by Ansible. Additional enhancements in Gluster Storage Release 6 for Oracle Linux: Several stability fixes Client side inode garbage collection Performance Improvements Gluster Storage Release 6 for Oracle Linux is today supported on following configurations: Platform Operating System Release Minimum Operating System Maintenance Release Kernel x86_64 Oracle Linux 8 Oracle Linux 8 Update 1 Red Hat Compatible Kernel (RHCK) x86_64 Oracle Linux 7 Oracle Linux 7 Update 7 Unbreakable Enterprise Kernel Release 5 (UEK R5) Unbreakable Enterprise Kernel Release 4 (UEK R4) Red Hat Compatible Kernel (RHCK) aarch64 Oracle Linux 7 Oracle Linux 7 Update 7 Unbreakable Enterprise Kernel Release 5 (UEK R5)   Installation Gluster Storage is available on the Unbreakable Linux Network (ULN) and the Oracle Linux yum server. For more information on hardware requirements and how to install and configure Gluster, please review the Gluster Storage for Oracle Linux Release 6 Documentation. Support Support for Gluster Storage is available to customers with an Oracle Linux Premier Support Subscription. Oracle Linux Resources: Documentation Oracle Linux Software Download Oracle Linux Oracle Container Registry Blogs Oracle Linux Blog Community Pages Oracle Linux Social Media Oracle Linux on YouTube Oracle Linux on Facebook Oracle Linux on Twitter Data Sheets, White Papers, Videos, Training, Support & more Oracle Linux Product Training and Education Oracle Linux For community-based support, please visit the Oracle Linux space on the Oracle Developer Community.

The Oracle Linux and Virtualization team is pleased to announce the release of Gluster Storage Release 6 for Oracle Linux, bringing customers higher performance, new storage capabilities and...

Linux

Easy Provisioning Of Cloud Instances On Oracle Cloud Infrastructure With The OCI CLI

As a developer, I often provision ephemeral instances in OCI for small projects or for testing purposes. Between the Browser User Interface which is not very convenient for repetitive tasks and Terraform which would be over-engineered for my simple needs the OCI Command Line Interface (CLI) offers a simple but powerful interface to the Oracle Cloud Infrastructure. In this article I will share my experience with this tool and provide as example the script I am using to provision cloud instances. The OCI CLI The OCI CLI requires python version 3.5 or later, running on Mac, Windows, or Linux. Installation instructions are provided on the OCI CLI Quickstart page. The examples from this article have been been tested on Linux, macOS and Windows. Windows users can use either Windows Subsystem for Linux or Git BASH. These examples assume that the OCI CLI is already installed and configured; and that the compartment is saved in the ~/.oci/oci_cli_rc file: [DEFAULT] compartment-id = ocid1.compartment.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Handling the OCI CLI output: JMESPath The main challenge of using the OCI CLI in scripts is handling its responses. By default, all responses to a command are returned in JSON format. E.g. $ oci os ns get { "data": "mynamespace" } Alternatively, a table format is also available: $ oci os ns get --output table +-------------+ | Column1 | +-------------+ | mynamespace | +-------------+ But none of these formats are directly usable in a shell script. One could use the well known jq JSON processor, but the OCI CLI is built with the JMESPath library which allows JSON manipulation without the need of an third party tool. With the same simple request we can select the data field: $ oci os ns get --query 'data' "mynamespace" Finally we can get rid of the quotes using the raw output format: $ oci os ns get --query 'data' --raw-output mynamespace And to capture the output in a shell variable: $ ns=$(oci os ns get --query 'data' --raw-output) $ echo $ns mynamespace As a less trivial example, the following returns the image OCID of the latest Oracle Linux 7.7 image compatible with the VM.Standard2.1 shape: $ ocid=$(oci compute image list \ --operating-system "Oracle Linux" \ --operating-system-version "7.7" \ --shape "VM.Standard2.1" \ --sort-by TIMECREATED \ --query 'data[0].id' \ --raw-output) $ echo $ocid ocid1.image.oc1.eu-frankfurt-1.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx The --raw-output option is only effective when the output of the query returns a single string value. When multiple values are expected we will concatenate them in the query. Depending on the format of the fields, I typically use two different constructions to retrieve the data: concatenate with space or new line separators. The space construct is the simplest, but it obviously won’t work if your fields are free text. $ response=$(oci compute image list \ --operating-system "Oracle Linux" \ --operating-system-version "7.7" \ --shape "VM.Standard2.1" \ --sort-by TIMECREATED \ --query '[data[0].id, data[0]."display-name"] | join('"'"' '"'"',@)' \ --raw-output) $ read ocid display_name <<< "${response}" $ echo $ocid ocid1.image.oc1.eu-frankfurt-1.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $ echo $display_name Oracle-Linux-7.7-2020.01.28-0 Note: never use pipes to read and store data in shell variables as pipes are run in sub-shells! The new line construct is slightly more complex, but can be used with fields containing spaces: $ response=$(oci compute image list \ --operating-system "Oracle Linux" \ --operating-system-version "7.7" \ --shape "VM.Standard2.1" \ --sort-by TIMECREATED \ --query '[data[0].id, data[0]."display-name"] | join(`\n`,@)' \ --raw-output) $ { read ocid; read display_name; } <<< "${response}" $ echo $ocid ocid1.image.oc1.eu-frankfurt-1.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $ echo $display_name Oracle-Linux-7.7-2020.01.28-0 Notes: You can use inverted quotes instead of quotes for strings in JMESPath queries, it makes the overall quoting more readable. If you use a bash shell under Windows (Git BASH), make sure it properly handles DOS type end-of-line by setting the IFS environment variable: IFS=$' \t\r\n' Provisioning script Using the above constructions you can easily write a script to facilitate image provisioning. The provisioning script from which the code snippets are extracted is part of the ol-sample-scripts project on GitHub. My goal is to be able to swiftly provision instances in the same environment, so the script assumes there are a Virtual Cloud Network (VCN) and a Subnet already defined in the tenancy. A Public IP is always assigned. The following sections describe the high level steps needed to provision an image. Platform images This is the easiest case: the image OCID can be retrieved with a simple query: image_list=$(oci compute image list \ --operating-system "${operating_system}" \ --operating-system-version "${operating_system_version}" \ --shape ${shape} \ --sort-by TIMECREATED \ --query '[data[0].id, data[0]."display-name"] | join(`\n`,@)' \ --raw-output) it is important to include the target shape in the query to only retrieve compatible images. The Availability Domain is retrieved using pattern matching: availability_domain=$(oci iam availability-domain list \ --all \ --query 'data[?contains(name, `'"${availability_domain}"'`)] | [0].name' \ --raw-output) We also need the VCN and Subnet OCIDs: ocid_vcn=$(oci network vcn list \ --query "data [?\"display-name\"=='${vcn_name}'] | [0].id" \ --raw-output) ocid_subnet=$(oci network subnet list \ --vcn-id ${ocid_vcn} \ --query "data [?\"display-name\"=='${subnet_name}'] | [0].id" \ --raw-output) We now have all the data needed to launch the instance: ocid_instance=$(oci compute instance launch \ --display-name ${instance_name} \ --availability-domain "${availability_domain}" \ --subnet-id "${ocid_subnet}" \ --image-id "${ocid_image}" \ --shape "${shape}" \ --ssh-authorized-keys-file "${public_key}" \ --assign-public-ip true \ --wait-for-state RUNNING \ --query 'data.id' \ --raw-output) We use the --wait-for-state option to wait until the image is up and running. This allows us to retrieve and print the IP address, so we can immediately connect to our new instance: public_ip=$(oci compute instance list-vnics \ --instance-id "${ocid_instance}" \ --query 'data[0]."public-ip"' \ --raw-output) Marketplace images Unfortunately, the oci compute image list command only returns Platform and Custom images. What if we want to provision Oracle images from the Marketplace (Cloud Developer, Autonomous Linux, …)? This is a bit more complex as these images require you to accept the Oracle Standard Terms and Restrictions before using them. The Marketplace is also known as the Product Image Catalog (PIC) and the corresponding API calls are done with the oci pic commands. To instantiate an image from the Marketplace we need to: Get the image listing OCID – the query must be specific enough to return a single row. pic_listing=$(oci compute pic listing list \ --all \ --query 'data[?contains("display-name", `'"${image_name}"'`)].join('"'"' '"'"', ["listing-id", "display-name"]) | join(`\n`, @)' \ --raw-output) Using that listing OCID, find the latest image OCID in that listing: version_list=$(oci compute pic version list --listing-id "${ocid_listing}" \ --query 'sort_by(data,&"time-published")[*].join('"'"' '"'"',["listing-resource-version", "listing-resource-id"]) | join(`\n`, reverse(@))' \ --raw-output) The above query does not allow to specify a shape like we do for the Platform images. We have to browse the list until we find a compatible image: available=$(oci compute pic version get --listing-id "${ocid_listing}" \ --resource-version "${image_version}" \ --query 'data."compatible-shapes"|contains(@, `'${shape}'`)' \ --raw-output) Now that we have a compatible image OCID, we need to retrieve the agreement for the listing OCID: agreement=$(oci compute pic agreements get --listing-id "${ocid_listing}" \ --resource-version "${image_version}" \ --query '[data."oracle-terms-of-use-link", data.signature, data."time-retrieved"] | join(`\n`,@)' \ --raw-output) And eventually subscribe to the agreement: subscription=$(oci compute pic subscription create --listing-id "${ocid_listing}" \ --resource-version "${image_version}" \ --signature "${signature}" \ --oracle-tou-link "${oracle_tou_link}" \ --time-retrieved "${time_retrieved}" \ --query 'data."listing-id"' \ --raw-output) Once subscribed, we can proceed as we did for the Platform images. Cloud-init Beyond the simple provisioning, I like to have a ready to use instance with my favorite tools installed and configured (shell, editor preferences, …). This can be done with a cloud-init file. Cloud-init files can be very complex (see the cloud-init documentation), but in its simplest form it can just be a shell script. The file is passed as paramter to the oci compute instance launch command. As illustration, the project repository contains a simple oci-cloud-init.sh file. Sample session $ ./oci-provision.sh --help Usage: oci-provision.sh OPTIONS Provision an OCI compute instance. Options: --help, -h show this text and exit --os operating system (default: Oracle Linux) --os-version operating system version --image IMAGE image search pattern in the Marketplace os/os-version are ignored when image is specified --name NAME compute VM instance name --shape SHAPE VM shape (default: VM.Standard2.1) --ad AD Availability Domain (default: AD-1) --key KEY public key to access the instance --vcn VCN name of the VCN to attach to the instance --subnet SUBNET name of the subnet to attach to the instance --cloud-init CLOUD-INIT optional clout-init file to provision the instance Default values for parameters can be stored in ./oci-provision.env $ ./oci-provision.sh --image "Cloud Dev" \ --name Development \ --ad AD-3 \ --key ~/.ssh/id_rsa.pub \ --vcn "VCN-Dev" \ --subnet "Public Subnet" \ --cloud-init oci-cloud-init.sh +++ oci-provision.sh: Getting image listing oci-provision.sh: Selected image: oci-provision.sh: Image : Oracle Cloud Developer Image oci-provision.sh: Summary : Oracle Cloud Developer Image oci-provision.sh: Description: An Oracle Linux 7-based image with the latest development tools, languages, Oracle Cloud Infrastructure Software Development Kits and Database connectors at your fingertips +++ oci-provision.sh: Getting latest image version oci-provision.sh: Version Oracle_Cloud_Developer_Image_19.11 selected +++ oci-provision.sh: Getting agreement and subscribing... oci-provision.sh: Term of use: https://objectstorage.us-ashburn-1.oraclecloud.com/n/partnerimagecatalog/b/eulas/o/oracle-apps-terms-of-use.txt oci-provision.sh: Subscribed +++ oci-provision.sh: Retrieving AD name +++ oci-provision.sh: Retrieving VCN +++ oci-provision.sh: Retrieving subnet +++ oci-provision.sh: Provisioning Development with VM.Standard2.1 (oci-cloud-init.sh) Action completed. Waiting until the resource has entered state: ('RUNNING',) +++ oci-provision.sh: Getting public IP address oci-provision.sh: Public IP is: xxx.xxx.xxx.xxx Demo

As a developer, I often provision ephemeral instances in OCI for small projects or for testing purposes.Between the Browser User Interface which is not very convenient for repetitive tasks and...

Linux

Generating a vmcore in OCI

  In this blog, Oracle Linux kernel developer Manjunath Patil demostrates how you can configure your Oracle Linux instances (both bare metal and virtual machine) running in Oracle Cloud for crash dumps. OCI instances can generate a vmcore using kdump. kdump is a mechanism to dump the 'memory contents of a system' [vmcore] when the system crashes. The vmcore later can be analyzed using the crash utility to understand the cause of the system crash. The kdump mechanism works by booting a second kernel [called kdump kernel or capture kernel] when the system running first kernel[called panicked kernel] crashes. The kdump kernel runs in its own reserved memory so that it wont affect the memory used by the system. The OCI systems are all pre-configured with kdump. When an OCI instance crashes, it will generate the vmcore which can be shared with developers to understand the cause of the crash. How to configure your Oracle Linux system with kdump 1. Pre-requisites Make sure you have the kexec-tools rpm installed shell # yum install kexec-tools # yum list installed | grep kexec-tools This is the main rpm which contains the tools to configure the kdump 2. Reserve memory for kdump kernel kdump kernel needs its own reserved memory so that when it boots, it won't use the first kernel's memory. The first kernel is told to reserve the memory for kdump kernel using crashkernel=auto kernel parameter. The first kernel needs to be rebooted for the kernel parameter to be effective. a. Here is how we can check if the memory is reserved # cat /proc/iomem | grep -i crash 27000000-370fffff : Crash kernel # dmesg | grep -e "Reserving .* crashkernel" [0.000000] Reserving 257MB of memory at 624MBfor crashkernel (System RAM: 15356MB) b. How to set kernel parameters OL6 systems - update the /etc/grub.conf file OL7 systems - update the /etc/default/grub file [GRUB_CMDLINE_LINUX= line] and re-generate the grub.cfg [grub2-mkconfig -o /boot/grub2/grub.cfg] 3. Setup the serial console Setting serial console prints progress of kdump kernel onto serial console. It would also help debugging any of the kdump kernel related issues. This setting is optional. To set: add 'console=tty0 console=ttyS0,115200n8' kernel parameters. Addition of kernel parameters require a reboot to be effective. 4. Configuring kdump /etc/kdump.conf is used to configure the kdump. The following are the two main configurations - a. where to dump the vmcore? Default location is /var/crash/ To change, update the line starting with 'path'. Make sure the new path has enough space to accommodate vmcore. b. minimize the size of vmcore We can reduce the size of vmcore by excluding memory pages such as pages filled with zero, user process data pages, free pages etc. This is controlled by 'core_collector' line in the config file. Default value is 'core_collector makedumpfile -p --message-level 1 -d 31' -p = compress the data using snappy --message-level = print messages on console. Range 0[brevity] to 31[verbose]. -d = dump level = dictates size of vmcore. Range 0[biggest] to 31[smallest] More on dump level and message-level in 'man makedumpfile' 5. Make kdump service run at boot time OL6: # chkconfig kdump on; chkconfig kdump --list OL7: # systemctl enable kdump; systemctl is-enabled kdump 6. Manually crash the system to make sure it's working # echo c > /proc/sysrq-trigger [After reboot] # ls -l /var/crash/* Keep the system in configured state, so that when system crashes vmcore is collected. 8. Examples a. OL6U10 - VM [root@ol6u10-vm ~]# cat /proc/cmdline ro root=UUID=... crashkernel=auto ... console=tty0 console=ttyS0,9600 [root@ol6u10-vm ~]# service kdump status Kdump is operational [root@ol6u10-vm ~]# cat /proc/iomem | grep -i crash 27000000-370fffff : Crash kernel [root@ol6u10-vm ~]# dmesg | grep -e "Reserving .* crashkernel" [ 0.000000] Reserving 257MB of memory at 624MB for crashkernel (System RAM: 15356MB) [root@ol6u10-vm ~]# echo c > /proc/sysrq-trigger [After reboot] [root@ol6u10-vm ~]# cat /etc/kdump.conf | grep -v '#' | grep -v '^$' path /var/crash core_collector makedumpfile -l --message-level 1 -d 31 [root@ol6u10-vm ~]# ls -lhs /var/crash/127.0.0.1-20.../ total 96M 96M -rw-------. 1 root root 96M Dec 13 00:48 vmcore 44K -rw-r--r--. 1 root root 41K Dec 13 00:48 vmcore-dmesg.txt [root@ol6u10-vm ~]# free -h total used free shared buffers cached Mem: 14G 395M 14G 208K 10M 114M -/+ buffers/cache: 270M 14G Swap: 8.0G 0B 8.0G b. OL6U10 - BM [root@ol6u10-bm ~]# cat /proc/cmdline ro root=UUID=... crashkernel=auto ... console=tty0 console=ttyS0,9600 [root@ol6u10-bm ~]# service kdump status Kdump is operational [root@ol6u10-bm ~]# cat /proc/iomem | grep -i crash 27000000-37ffffff : Crash kernel [root@ol6u10-bm ~]# dmesg | grep -e "Reserving .* crashkernel" [ 0.000000] Reserving 272MB of memory at 624MB for crashkernel (System RAM: 262010MB) [root@ol6u10-bm ~]# echo c > /proc/sysrq-trigger [After Reboot] [root@ol6u10-bm ~]# cat /etc/kdump.conf | grep -v '#' | grep -v '^$' path /var/crash core_collector makedumpfile -l --message-level 1 -d 31 [root@ol6u10-bm ~]# ls -lhs /var/crash/127.0.0.1-20.../ total 1.1G 1.1G -rw-------. 1 root root 1.1G Dec 18 05:24 vmcore 92K -rw-r--r--. 1 root root 90K Dec 18 05:23 vmcore-dmesg.txt [root@ol6u10-bm ~]# free -h total used free shared buffers cached Mem: 251G 1.4G 250G 224K 13M 157M -/+ buffers/cache: 1.2G 250G Swap: 8.0G 0B 8.0G c. OL7U7 - VM [root@ol7u7-vm opc]# free -h total used free shared buff/cache available Mem: 14G 290M 13G 16M 274M 13G Swap: 8.0G 0B 8.0G [root@ol7u7-vm opc]# service kdump status Redirecting to /bin/systemctl status kdump.service kdump.service - Crash recovery kernel arming Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled; vendor preset: enabled) Active: active (exited) ... ... ol7u7-vm systemd[1]: Started Crash recovery kernel arming. [root@ol7u7-vm opc]# cat /proc/cmdline BOOT_IMAGE=... crashkernel=auto ... console=tty0 console=ttyS0,9600 [root@ol7u7-vm opc]# dmesg | grep -e "Reserving .* crashkernel" [ 0.000000] Reserving 257MB of memory at 624MB for crashkernel (System RAM: 15356MB) [root@ol7u7-vm opc]# cat /proc/iomem | grep -i crash 27000000-370fffff : Crash kernel [root@ol7u7-vm ~]# ls -lhs /var/crash/127.0.0.1-20.../ total 90M 90M -rw-------. 1 root root 90M Dec 18 13:48 vmcore 48K -rw-r--r--. 1 root root 47K Dec 18 13:48 vmcore-dmesg.txt [root@ol7u7-vm ~]# cat /etc/kdump.conf | grep -v '#' | grep -v "^$" path /var/crash core_collector makedumpfile -l --message-level 1 -d 31 d. OL7U7-BM [root@ol7u7-bm opc]# free -h total used free shared buff/cache available Mem: 251G 1.1G 250G 17M 298M 249G Swap: 8.0G 0B 8.0G [root@ol7u7-bm opc]# service kdump status Redirecting to /bin/systemctl status kdump.service kdump.service - Crash recovery kernel arming Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled; vendor preset: enabled) Active: active (exited) ... ... ol7u7-bm systemd[1]: Started Crash recovery kernel arming. [root@ol7u7-bm opc]# cat /proc/cmdline BOOT_IMAGE=... crashkernel=auto ... console=tty0 console=ttyS0,9600 [root@ol7u7-bm opc]# cat /proc/iomem | grep -i crash 25000000-35ffffff : Crash kernel [root@ol7u7-bm opc]# dmesg | grep -e "Reserving .* crashkernel" [ 0.000000] Reserving 272MB of memory at 592MB for crashkernel (System RAM: 262010MB) [root@ol7u7-bm opc]# cat /etc/kdump.conf | grep -v '#' | grep -v '^$' path /var/crash core_collector makedumpfile -l --message-level 1 -d 31 [root@ol7u7-bm opc]# echo c > /proc/sysrq-trigger [root@ol7u7-bm ~]# ls -lhs /var/crash/127.0.0.1-20.../ total 1.1G 1.1G -rw-------. 1 root root 1.1G Dec 18 14:16 vmcore 116K -rw-r--r--. 1 root root 114K Dec 18 14:16 vmcore-dmesg.txt

  In this blog, Oracle Linux kernel developer Manjunath Patil demostrates how you can configure your Oracle Linux instances (both bare metal and virtual machine) running in Oracle Cloud for...

Linux

Building (Small) Oracle Linux Images For The Cloud

Overview Oracle Linux Image Tools is a sample project to build small or customized Oracle Linux Cloud images in a repeatable way. It provides a bash modular framework which uses HashiCorp Packer to build images in Oracle VM VirtualBox. Images are then converted to an appropriate format depending on the Cloud provider. This article shows you how to build the sample images from this repository and how to use the framework to build custom images. The framework is based around two concepts: Distribution and Cloud modules. A Distribution module is responsible for the installation and configuration of Oracle Linux as well as the packages needed for your project. The sample ol7-slim and ol8-slim distributions provide Oracle Linux images with a minimalist set of packages (about 250 packages – smaller than an Oracle Linux Minimal Install). A Cloud module ensures that the image is properly configured and packaged for a particular cloud provider. The following modules are currently available: oci: Oracle Cloud Infrastructure (QCOW2 file) olvm: Oracle Linux Virtualization Manager (OVA file) ovm: Oracle VM Server (OVA file) azure: Microsoft Azure (VHD file) vagrant-virtualbox and vagrant-libvirt: Vagrant boxes (BOX file) none: no cloud customization (OVA file) Build requirements Environment A Linux environment is required for building images. The project is developed and tested with Oracle Linux 7 and 8, but should run on most Linux distribution. If your environment is a virtual machine, it must support nested virtualization. The build tool needs root privileges to mount the generated images. Ensure sudo is properly configured for the user running the build. Software You will need the following software installed: HashiCorp Packer and Oracle VM VirtualBox Oracle Linux 7 yum --enablerepo=ol7_developer install packer VirtualBox-6.1 Oracle Linux8 dnf --enablerepo=ol8_developer install VirtualBox-6.1 Download and install Packer from HashiCorp kpartx and qemu-img to manipulate the artifacts yum install kpartx qemu-img Disk space You will need at least twice the size of your images as free disk space. That is: building a 30GB image will require 60GB of free space. Building the project images Building the images from the project is straightforward. Configuration Build configuration is done by editing the env.properties file (or better, a copy of it). Options are documented in the property file, but at the very least you must provide: WORKSPACE: the directory used for the build ISO_URL / ISO_SHA1_CHECKSUM: location of the Oracle Linux ISO image. You can download it from the Oracle Software Delivery Cloud or use a public mirror. The image is cached in the workspace. DISTR: the Distribution to build CLOUD: the target cloud provider. Sample build The following env.properties.oci property file is used to build a minimal OL7 image for the Oracle Cloud Infrastructure, using all default parameters: WORKSPACE="/data/workspace" ISO_URL="http://my.mirror.example.com/iso/ol7/OracleLinux-R7-U7-Server-x86_64-dvd.iso" ISO_SHA1_CHECKSUM="3ef94628cf1025dab5f10bbc1ed2005ca0cb0933" DISTR="ol7-slim" CLOUD="oci" Run the script: $ ./bin/build-image.sh --env env.properties.oci +++ build-image.sh: Parse arguments +++ build-image.sh: Load environment +++ build-image.sh: Stage Packer files +++ build-image.sh: Stage kickstart file +++ build-image.sh: Generate Packer configuration file +++ build-image.sh: Run Packer build-image.sh: Spawn HTTP server build-image.sh: Invoke Packer ... build-image.sh: Package image +++ build-image.sh: Cleanup Workspace +++ build-image.sh: All done +++ build-image.sh: Image available in /data/workspace/OL7U7_x86_64-oci-b0 $ That’s it! The /data/workspace/OL7U7_x86_64-oci-b0 directory now contains OL7U7_x86_64-oci-b0.qcow, a QCOW2 file which can be imported and run on OCI. Adding new modules Directory layout Each Distribution module is represented by a subdirectory of the distr directory. Each Cloud module is represented by a subdirectory of the cloud directory. Additionally, Cloud actions for a specific Distribution can be defined in the cloud/<cloud>/<distr> directory. Any element not necessary can be omitted – e.g. the none cloud module only provides a packaging function. All the env.properties files are merged and made available to the scripts at runtime. They define parameters with default values which can be overridden by the user in the global env.properties file in the project base directory. Adding a distribution To add a new distribution, create a directory in distr/ with the following files: env.properties: parameters for the distribution. ks.cfg: a kickstart file to bootstrap the installation. This is the only mandatory file. image-scripts.sh: a shell script with the following optional functions which will be invoked on the build host: distr::validate: validate the parameters before the build. distr::kickstart: tailor the kickstart file based on the parameters. distr::image_cleanup: disk image cleanup run at the end of the build. provision.sh: a shell script with the following optional functions which will be invoked on the VM used for the build: distr::provision: image provisioning (install/configure software) distr::cleanup: image cleanup (uninstall software, …) files directory: the files in this directory are copied to the image in /tmp/distr and can be used by the provisioning scripts. Adding a cloud The process is similar to the distribution: create a directory in cloud/ with the following files: env.properties: parameters for the cloud. image-scripts.sh: a shell script with the following optional functions which will be invoked on the build host: cloud::validate: validate the parameters before the build. cloud::kickstart: tailor the kickstart file based on the parameters. cloud::image_cleanup: disk image cleanup run at the end of the build. cloud::image_package: package the image in a suitable format for the cloud provider. This is the only mandatory function. provision.sh: a shell script with the following optional functions which will be invoked on the VM used for the build: cloud::provision: image provisioning (install/configure software) cloud::cleanup: image cleanup (uninstall software, …) files directory: the files in this directory are copied to the image in /tmp/cloud and can be used by the provisioning scripts. If some cloud actions are specific to a particular distribution, they can be specified in the <cloud>/<distr> subdirectory. If a cloud_distr::image_package function is provided it will override the cloud::image_package one. Builder flow The complete build flow is illustrated hereunder: The builder goes through the following steps: Build environment All the env.properties files are sourced and merged. The user provided one is sourced last and defines the build behavior The validate() functions are called. These hooks perform a sanity check on the parameters Packer configuration and run The distribution kickstart file is copied and the kickstart() hooks have the opportunity to customize it The distribution is installed in a VirtualBox VM using this kickstart files The files directories are copied in /tmp on the VM The provision() functions are run in the VM The cleanup() functions are run in the VM Packer will then shutdown and export the VM Image cleanup The generated image is unpacked and mounted on the host The image_cleanup() functions are called The image is unmounted The final package is created by the image_package() function, either from cloud_distr or from cloud

Overview Oracle Linux Image Tools is a sample project to build small or customized Oracle Linux Cloud images in a repeatable way. It provides a bash modular framework which uses HashiCorp Packer to...

Events

Live Webcast: Top 5 Reasons to Build your Virtualization with Oracle Linux KVM

Register Today: February 27, 2020 EMEA: 10:00 a.m. GMT/11:00 CET/12:00 SAST/14:00 GST APAC: 10:30 AM IST/ 1:00 PM SGT/4:00 PM AEDT North America: 09:00 AM Pacific Standard Time Recent industry surveys indicate that most enterprises have a strategy of using multiple clouds. Most who are planning to migrate to cloud start with modernizing their on premises data center. The choice of Linux and Virtualization can make a big impact on their infrastructure, both today and tomorrow. Oracle Linux Virtualization Manager, based on the open source oVirt project, can be easily deployed to configure, monitor, and manage an Oracle Linux KVM environment with enterprise-grade performance and support for both on premise and cloud.     Join this webcast to learn from Oracle experts about the top 5 reasons to build your virtualization infrastructure using Oracle Linux KVM:   Accelerated deployment with ready to go VMs with Oracle software  Increased performance and security Simplified, easy management of the full stack Improved licensing costs through hard partitioning Lower licensing and support costs while increasing benefits   Featured Speakers Simon Coter Director of Product Management for Linux and Virtualization, Oracle Simon is responsible for both Oracle Linux and Virtualization, the Unbreakable Enterprise Kernel along with all its sub-components and add-ons, including Oracle Linux KVM, Oracle Linux Virtualization Manager, Ceph, Gluster, Oracle VM and VirtualBox. John Priest  Product Management Director for Oracle Server Virtualization John covers all aspects of the Oracle Linux Virtualization Manager and Oracle VM product life-cycles.

Register Today: February 27, 2020 EMEA: 10:00 a.m. GMT/11:00 CET/12:00 SAST/14:00 GST APAC: 10:30 AM IST/ 1:00 PM SGT/4:00 PM AEDT North America: 09:00 AM Pacific Standard Time Recent industry surveys...

Libcgroup in the Twenty-First Century

In this blog post, Oracle Linux kernel developer Tom Hromatka writes about the new testing frameworks, continuous integration and code coverage capabilities that have been added to libcgroup. In 2008 libcgroup was created to simplify how users interact with and manage cgroups. At the time, only cgroups v1 existed, the libcgroup source was hosted in a subversion repository on Sourceforce, and System V still ruled the universe. Fast forward to today and the landscape is changing quickly. To pave the way for cgroups v2 support in libcgroup, we have added unit tests, functional tests, continuous integration, code coverage, and more. Unit Testing In May 2019 we added the googletest unit testing framework to libcgroup. libcgroup has many large, monolithic functions that perform the bulk of the cgroup management logic, and adding cgroup v2 support to these complex functions could easily introduce regressions. To combat this, we plan on adding tests before we add cgroup v2 support. Functional Testing In June 2019 we added a functional test framework to libcgroup. The functional test framework consists of several Python classes that either represent cgroup data or can be used to manage cgroups and the system. Years ago tests were added to libcgroup, but they have proven difficult to run and maintain because they are destructive to the host system's libcgroup hierarchy. With the advent of containers, this problem can easily be avoided. The functional test framework utilizes LXC containers and the LXD interfaces to encapsulate the tests. Running the tests within a container provides a safe environment where cgroups can be created, deleted, and modified in an easily reproducible setting - without destructively modifying the host's cgroup hierachy. libcgroup's functional tests are quick and easy to write and provide concise and informative feedback on the status of the run. Here's a simple example of a successful test run: $ ./001-cgget-basic_cgget.py ----------------------------------------------------------------- Test Results: Run Date: Dec 02 17:54:28 Passed: 1 test(s) Skipped: 0 test(s) Failed: 0 test(s) ----------------------------------------------------------------- Timing Results: Test Time (sec) --------------------------------------------------------- setup 5.02 001-cgget-basic_cgget.py 0.76 teardown 0.00 --------------------------------------------------------- Total Run Time 5.79 And here's an example of where something went wrong. In this case I have artificially caused the Run() class to raise an exception early in the test run. The framework reports the test and the exact command that failed. The return code, stdout, and stderr from the failing command are also reported to facilitate debugging. And of course the log file contains a chronological history of the entire test run to further help in troubleshooting the root cause. $ ./001-cgget-basic_cgget.py ----------------------------------------------------------------- Test Results: Run Date: Dec 02 18:11:47 Passed: 0 test(s) Skipped: 0 test(s) Failed: 1 test(s) Test: 001-cgget-basic_cgget.py - RunError: command = ['sudo', 'lxc', 'exec', 'TestLibcg', '--', '/home/thromatka/git/libcgroup/src/tools/cgset', '-r', 'cpu.shares=512', '001cgget'] ret = 0 stdout = b'' stderr = b'I artificially injected this exception' ----------------------------------------------------------------- Continuous Integration and Code Coverage In September 2019 we added continuous integration and code coverage to libcgroup. libcgroup's github repository is now linked with Travis CI to automatically configure the library, build the library, run the unit tests, and run the functional tests every time a commit is pushed to the repo. If the tests pass, Travis CI invokes coveralls.io to gather code coverage metrics. The continuous integration status and the current code coverage percentage are prominently displayed on the github source repository. Currently all two :) tests are passing and code coverage is at 16%. I have many more tests currently in progress, so expect to see these numbers improve significantly in the next few months. Future Work Ironically, after all these changes, we're now nearly ready to start the "real work." A loose roadmap of our upcoming improvements: Add an "ignore" rule to cgrulesengd. (While not directly related to the cgroup v2 work, this new ignore rule will heavily utilize the testing capabilities outlined above) Add a ton more tests - both unit and functional Add cgroup v2 support to our functional testing framework. I have a really rough prototype working, but I think automating it will require help from the Travis CI development team Add cgroup v2 capabilities to libcgroup utilities like cgget, cgset, etc. Design and implement a cgroup abstraction layer that will abstract away all of the gory detail differences between cgroup v1 and cgroup v2

In this blog post, Oracle Linux kernel developer Tom Hromatka writes about the new testing frameworks, continuous integration and code coverage capabilities that have been added to libcgroup. In 2008...

Events

Join the Oracle Linux and Virtualization Team in London at Oracle OpenWorld Europe

The Oracle OpenWorld Global Series continues with our next stop at ExCeL London, February 12–13, 2020. With just 5 days left to register, you’ll want to sign up now for your complementary pass and reserve your place. Across the two days, you can immerse yourself in the infinite possibilities of a data-driven world. Wednesday, 12 February | Insight Starts Here | Outpace Change with Intelligence Explore how leading companies—faced with an ever-accelerating pace of change—are unlocking insights with data to re-engineer the core of their business, elevate the value they deliver to customers, pioneer new ways of working, and drive completely new opportunities. Thursday, 13 February | Innovation Starts Here | Technology-Powered Possibilities Dive deep into the transformational and autonomous technologies fundamentally changing work and life. Fuel innovation by pulling value from vast amounts of data at scale and unleashing opportunities with AI and machine learning and a long list of featured speakers and luminaries. We look forward to seeing you there. Be sure to add these two sessions to your agenda: Wim Coekaerts, SVP, Software Development, will present a Solution Keynote: Cloud Platform and Middleware Strategy and Roadmap [SOL1194-LON] Thursday, Feb 13 | 09:00 - 10:20 | Arena F - Zone 6 In this session, Wim Coekaerts will discuss the strategy and vision for Oracle’s comprehensive cloud platform services and on-premise software. Customers are on a number of journeys to the cloud: moving and modernizing workloads out of data centers; transitioning off on-premises apps to SaaS; innovating with new API-first, chatbot-based container native applications; optimizing IT operations and security from the cloud; and getting real-time insight leveraging big data and analytics from the cloud. Hear from customers about how they leverage Oracle Cloud for their digital transformation. And hear how Oracle’s application development, integration, systems management, and security solutions leverage artificial intelligence to drive cost savings and operational efficiency for hybrid and multicloud ecosystems. Simon Coter, Product Management Director, Oracle Linux and Virtualization, delivers a Breakout Session: Tools and Techniques for Modern Cloud Native Development [SES1270-LON]  Thursday, Feb 13 | 13:05 - 13:40 | Arena C - Zone 2 Simon Coter will explore the tools, techniques, and strategies you can apply using Oracle Linux to help you evolve toward a cloud native future. On-premise or in the cloud, you'll learn how Oracle Linux Cloud Native Environment enables you to deploy reliable, secure, and scalable applications. You will also discover how Kubernetes, Docker, CRI-O, and Kata Containers, available for free with Oracle Linux Premier Support, and Oracle VM VirtualBox deliver an exceptional DevSecOps solution. Explore all of the conference’s content through the detailed content catalogue and attend keynote sessions and other sessions of your interest. Join Us at The Exchange | Zone 3 Talk with product experts and experience the latest Oracle Linux and Oracle Virtualization technologies first hand. You’ll find us at two stands in Zone 3 of The Exchange. Don’t miss the Raspberry Pi “Mini” Super Computer search for aliens!  @ Groundbreakers Hub | Zone 3    Mini is the sibling of Super Pi, the super computer demonstrated at Oracle OpenWorld San Francisco in October, 2019, and among the top 10 Raspberry Pi projects last year.  Mini is a portable Pi cluster in a large pelican-like case on wheels with 84 Raspberry Pi 3B+ boards running Oracle Linux 8. Check out Mini as it searches for aliens with SETI@home.   Bold ideas. Breakthrough technologies. Better possibilities. It all starts here. Register now. We look forward to meeting you in London. Join the conversation: @OracleLinux @OracleOpenWorld #OOWLON #OracleTux

The Oracle OpenWorld Global Series continues with our next stop at ExCeL London, February 12–13, 2020. With just 5 days left to register, you’ll want to sign up now for your complementary passand...

Linux Kernel Development

Unbinding Parallel Jobs in Padata

Oracle Linux kernel developer Daniel Jordan contributes this post on enhancing the performance of padata. padata is a generic framework for parallel jobs in the kernel -- with a twist. It not only schedules jobs on multiple CPUs but also ensures that each job is properly serialized, i.e. finishes in the order it was submitted. This post will provide some background on this somewhat obscure feature of the core kernel and cover recent efforts to enhance its parallel performance in preparation for more multithreading in the kernel. How Padata Works padata allows users to create an instance that represents a certain class of parallel jobs, for example IPsec decryption (see pdecrypt in the kernel source). The instance serves as a handle when submitting jobs to padata so that all jobs submitted with the same handle are serialized amongst themselves. An instance also allows for fine-grained control over which CPUs are used to run work, and contains other internal data such as the next sequence number to assign for serialization purposes and the workqueue used for parallelization. To initialize a job (known cryptically as padata_priv in the code), a pair of function pointers are required, parallel and serial, where parallel is responsible for doing the actual work in a workqueue worker and serial completes the job once padata has serialized it. The user submits the job along with a corresponding instance to the framework via padata_do_parallel to start it running, and once the job's parallel part is finished, the user calls padata_do_serial to inform padata of this. padata_do_serial is currently always called from parallel, but this is not strictly required. padata ensures that a job's serial function is called only when the serial functions of all previously-submitted jobs from the same instance have been called. Though parallelization is ultimately padata's (and this blog post's) reason for being, its serialization algorithm is the most technically interesting part, so I'll go on a tangent to explain a bit about it. For scalability reasons, padata allocates internal per-CPU queues, and there are three types, parallel, reorder, and serial, where each type is used for a different phase of a padata job's lifecycle. When a job is submitted to padata, it's atomically assigned a unique sequence number within the instance that determines the order its serialization callback runs. The sequence number is hashed to a CPU that is used to select which queue a job is placed on. When the job is preparing to execute its parallel function, it is placed on a parallel per-CPU queue that determines which CPU it runs on (this becomes important later in the post). Using a per-CPU queue allows multiple tasks to submit parallel jobs concurrently with only minimal contention from the atomic op on the sequence number, avoiding a shared lock. When the parallel part finishes and the user calls padata_do_serial, padata then places the job on the reorder queue, again corresponding to the CPU that the job hashed to. And finally, a job is placed on the serial queue once all jobs before it have been serialized. During the parallel phase, jobs may finish out of order relative to when they were submitted. Nevertheless, each call to padata_do_serial places the job on its corresponding reorder queue and attempts to process the entire reorder queue across all CPUs, which entails repeatedly checking whether the job with the next unserialized sequence number has finished until there are no more jobs left to reorder. These jobs may or may not include the one passed to padata_do_serial because again, jobs finish out of order. This process of checking for the next unserialized job is the biggest potential bottleneck in all of padata because a global lock is used. Without the lock, multiple tasks might process the reorder queues at once, leading to duplicate serial callbacks and list corruption. However, if all calls to padata_do_serial were to wait on the lock when only one call actually ends up processing all the jobs, the rest of the tasks would be waiting for no purpose and introduce unnecessary latency in the system. To avoid this situation, the lock is acquired with a trylock call, and if a task fails to get the lock, it can safely bail out of padata knowing that a current or future lock holder will take care of its job. This serialization process is important for the use case that prompted padata to begin with, IPsec. IPsec throughput was a bottleneck in the kernel because a single CPU, the one that the receiving NIC's interrupt ran on, was doing all the work, with the CPU-intensive portion largely consisting of the crypto operations. Parallelization could address this, but serialization was required to maintain the packet ordering that the upper layer protocols required, and getting that right was not an easy task. See this presentation from Steffen Klassert, the original author of padata, for more background. More Kernel Multithreading Though padata was designed to be generic, it currently has just the one IPsec user. There are more kernel codepaths that can benefit from parallelization, such as struct page initialization, page clearing in various memory management paths (huge page fallocate, get_user_pages), and page freeing at munmap and exit time. Two previous blog posts and an LWN article on ktask have covered some of these. Recent upstream feedback has called for merging ktask with padata, and the first step in that process is to change where padata schedules its parallel workers. To that end, I posted a series on the mailing lists, merged for the v5.3 release, that adds a second workqueue per padata instance dedicated to parallel jobs. Earlier in the post, I described padata's per-CPU parallel queues. To assign a job to one of these queues, padata uses a simple round-robin algorithm to hash a job's sequence number to a CPU, and then runs the job bound to that CPU alone. Each successive job submitted to the instance runs on the next CPU. There are two problems with this approach. First, it's not NUMA-aware, so on multi-socket systems, a job may not run locally. Second, on a busy system, a job will likely complete faster if it allows the scheduler to select the CPU within the NUMA node it's run on. To solve both problems, the series uses an unbound workqueue, which is NUMA-aware by default and not bound to a particular CPU (hence the name). Performance Results The numbers from tcrypt, a test module in the kernel's crypto layer, look promising. Parts are shown here, see the upstream post for the full data. Measurements are from a 2-socket, 20-core, 40-CPU Xeon server. For repeatability, modprobe was bound to a CPU and the serial cpumasks for both pencrypt and pdecrypt were also restricted to a CPU different from modprobe's. # modprobe tcrypt alg="pcrypt(rfc4106(gcm(aes)))" type=3 # modprobe tcrypt mode=211 sec=1 # modprobe tcrypt mode=215 sec=1 Busy system (tcrypt run while 10 stress-ng tasks were burning 100% CPU) base test ---------------- --------------- speedup key_sz blk_sz ops/sec stdev ops/sec stdev (pcrypt(rfc4106-gcm-aesni)) encryption (tcrypt mode=211) 117.2x 160 16 960 30 112555 24775 135.1x 160 64 845 246 114145 25124 113.2x 160 256 993 17 112395 24714 111.3x 160 512 1000 0 111252 23755 110.0x 160 1024 983 16 108153 22374 104.2x 160 2048 985 22 102563 20530 98.5x 160 4096 998 3 98346 18777 86.2x 160 8192 1000 0 86173 14480 multibuffer (pcrypt(rfc4106-gcm-aesni)) encryption (tcrypt mode=215) 242.2x 160 16 2363 141 572189 16846 242.1x 160 64 2397 151 580424 11923 231.1x 160 256 2472 21 571387 16364 237.6x 160 512 2429 24 577264 8692 238.3x 160 1024 2384 97 568155 6621 216.3x 160 2048 2453 74 530627 3480 209.2x 160 4096 2381 206 498192 19177 176.5x 160 8192 2323 157 410013 9903 Idle system (tcrypt run by itself) base test ---------------- --------------- speedup key_sz blk_sz ops/sec stdev ops/sec stdev (pcrypt(rfc4106-gcm-aesni)) encryption (tcrypt mode=211) 2.5x 160 16 63412 43075 161615 1034 4.1x 160 64 39554 24006 161653 981 6.0x 160 256 26504 1436 160110 1158 6.2x 160 512 25500 40 157018 951 5.9x 160 1024 25777 1094 151852 915 5.8x 160 2048 24653 218 143756 508 5.6x 160 4096 24333 20 136752 548 5.0x 160 8192 23310 15 117660 481 multibuffer (pcrypt(rfc4106-gcm-aesni)) encryption (tcrypt mode=215) 1.0x 160 16 412157 3855 426973 1591 1.0x 160 64 412600 4410 431920 4224 1.1x 160 256 410352 3254 453691 17831 1.2x 160 512 406293 4948 473491 39818 1.2x 160 1024 395123 7804 478539 27660 1.2x 160 2048 385144 7601 453720 17579 1.2x 160 4096 371989 3631 449923 15331 1.2x 160 8192 346723 1617 399824 18559 A few tools were used in the initial performance analysis to confirm the source of the speedups. I'll show results from one of them, ftrace. Custom kernel events were added to record the runtime and CPU number of each crypto request, which runs a padata job under the hood. For analysis only (not the runs that produced these results), the threads of the competing workload stress-ng were bound to a known set of CPUs, and two histograms were created of crypto request runtimes, one for just the CPUs without the stress-ng tasks ("uncontended") and one with ("contended"). The histogram clearly shows increased times for the padata jobs with contended CPUs, as expected: Crypto request runtimes (usec) on uncontended CPUs # request-count: 11980; mean: 41; stdev: 23; median: 45 runtime (usec) count -------------- -------- 0 - 1 [ 0]: 1 - 2 [ 0]: 2 - 4 [ 0]: 4 - 8 [ 209]: * 8 - 16 [ 3630]: ********************* 16 - 32 [ 188]: * 32 - 64 [ 6571]: ************************************** 64 - 128 [ 1381]: ******** 128 - 256 [ 1]: 256 - 512 [ 0]: 512 - 1024 [ 0]: 1024 - 2048 [ 0]: 2048 - 4096 [ 0]: 4096 - 8192 [ 0]: 8192 - 16384 [ 0]: 16384 - 32768 [ 0]: Crypto request runtimes (usec) on contended CPUs # request-count: 3991; mean: 3876; stdev: 455; median 3999 runtime (usec) count -------------- -------- 0 - 1 [ 0]: 1 - 2 [ 0]: 2 - 4 [ 0]: 4 - 8 [ 0]: 8 - 16 [ 0]: 16 - 32 [ 0]: 32 - 64 [ 0]: 64 - 128 [ 0]: 128 - 256 [ 0]: 256 - 512 [ 4]: 512 - 1024 [ 4]: 1024 - 2048 [ 0]: 2048 - 4096 [ 3977]: ************************************** 4096 - 8192 [ 4]: 8192 - 16384 [ 2]: 16384 - 32768 [ 0]: Conclusion Now that padata has unbound workqueue support, look out for further enhancements to padata in coming releases! Next steps include creating padata threads in cgroups so they can be properly throttled and adding multithreaded job support to padata.

Oracle Linux kernel developer Daniel Jordan contributes this post on enhancing the performance of padata. padata is a generic framework for parallel jobs in the kernel -- with a twist. It not only...

Announcements

Announcing the First Oracle Linux 7 Template for Oracle Linux KVM

We are proud to announce the first Oracle Linux 7 Template for Oracle Linux KVM and Oracle Linux Virtualization Manager. The new Oracle Linux 7 Template for Oracle Linux KVM and Oracle Linux Virtualization Manager supplies powerful automation. It is built on cloud-init, the same technology used today on Oracle Cloud Infrastructure. The template has been built with the following components/options: Oracle Linux 7 Update 7 x86_64 Unbreakable Enterprise Kernel 5 - kernel-uek-4.14.35-1902.5.2.2.el7uek.x86_64 Red Hat Compatible Kernel - kernel-3.10.0-1062.1.2.el7.x86_64 8GB of RAM 15GB of OS virtual disk Downloading Oracle Linux 7 Template for Oracle Linux KVM Oracle Linux 7 Template for Oracle Linux KVM is available on Oracle Software Delivery Cloud. Search for "Oracle Linux KVM" and select "Oracle Linux KVM Templates for Oracle Linux" Click on the "Add to Cart" button and then click on "Checkout" in the right upper corner. On the following window, select "Linux-x86_64" and click on the "Continue" button: Accept the "Oracle Standard Terms and Restrictions" to continue and, on the following window, click on "V988166-01.zip" to download the Oracle Linux 7 Template for Oracle Linux KVM and on "V988167-01.zip" to download the README with instructions: Further information Oracle Linux 7 Template for Oracle Linux KVM allows you to configure different options on the first boot for your Virtual Machine; cloud-init options configured on Oracle Linux 7 Template are: VM Hostname define the Virtual Machine hostname Configure Timezone define the Virtual Machine timezone (within an existing available list) Authentication Username define a custom Linux user on the Virtual Machine Password Verify Password define the password for the custom Linux user on the Virtual Machine SSH Authorized Keys SSH authorized keys to get password-less access to the Virtual Machine Regenerate SSH Keys Option to regenerate the Virtual Machine Host SSH Keys Networks DNS Servers define the Domain Name Servers for the Virtual Machine DNS Search Domains define the Domain Name Servers Search Domain for the Virtual Machine In-guest Network Interface Name define the virtual-NIC device name for the Virtual Machine (ex. eth0) Custom script Execute a custom-script at the end of the cloud-init configuration process All of those options can be easily managed by "Oracle Linux Virtualization Manager" web interface by editing the Virtual Machine and enabling "Cloud-Init/Sysprep" option: Further details on how to import and use the Oracle Linux 7 Template for Oracle Linux KVM are available in this Technical Article on Simon Coter's Oracle Blog. Oracle Linux KVM & Virtualization Manager Support Support for Oracle Linux Virtualization Manager is available to customers with an Oracle Linux Premier Support subscription. Refer to Oracle Unbreakable Linux Network for additional resources on Oracle Linux support. Oracle Linux Resources Documentation Oracle Linux Virtualization Manager Documentation Blogs Oracle Linux Blog Oracle Virtualization Blog Community Pages Oracle Linux Product Training and Education Oracle Linux Administration - Training and Certification Data Sheets, White Papers, Videos, Training, Support & more Oracle Linux Social Media Oracle Linux on YouTube Oracle Linux on Facebook Oracle Linux on Twitter

We are proud to announce the first Oracle Linux 7 Template for Oracle Linux KVM and Oracle Linux Virtualization Manager. The new Oracle Linux 7 Template for Oracle Linux KVM and Oracle Linux...

Linux Kernel Development

The Benefit of Static Trace Points

Chuck Lever is a Linux Kernel Architect working with the Oracle Linux and Unbreakable Enterprise Kernel team at Oracle. He contributed this article about replacing printk debugging with static trace points in the kernel. On The Benefits of Static Trace Points These days, kernel developers have several choices when it comes to reporting exceptional events. Among them: a console message; a static trace point; Dtrace; or, a Berkeley Packet Filter script. Arguably the best choice for building an observability framework into the kernel is the judicious use of static trace points. Amongst the several kernel debugging techniques that are currently in vogue, we like static trace points. Here's why. A little history Years ago IBM coined the term First Failure Data Capture (FFDC). Capture enough data about a failure, just as it occurs the first time, so that reproducing the failure is all but unnecessary. An observability framework is a set of tools that enable system administrators to monitor and troubleshoot systems running in production, without interfering with efficient operation. In other words, it captures enough data about any failure that occurs so that a failure can be root-caused and possibly even fixed without the need to reproduce the failure in vitro. Of course, FFDC is an aspirational goal. There will always be a practical limit to how much data can be collected, managed, and analyzed without impacting normal operation. The key is to identify important exceptional events and place hooks in those areas to record those events as they happen. These exceptional events are hopefully rare enough that the captured data is manageable. And the hooks themselves must introduce little or no overhead to a running system. The trace point facility The trace point facility, also known as ftrace, has existed in the Linux kernel for over a decade. Each static trace point is an individually-enabled call out that records a set of data as a structured record into a circular buffer. An area expert determines where each trace point is placed, what data is stored in the structured record, and how the stored record should be displayed (i.e., a print format specifier string). The format of the structured record acts as a kernel API. It is much simpler to parse than string output by printk. User space tools can filter trace data based on values contained in the fields (e.g., show me just trace events where "status != 0"). Each trace point is always available to use, as it is built into the code. When triggered, a trace point can do more than capture the values of a few variables. It also records a timestamp and whether interrupts are enabled, and which CPU, which PID, and which executable is running. It is also able to enable or disable other trace points, or provide a stack trace. Dtrace and eBPF scripts can attach to a trace point, and hist triggers are also possible. Trace point buffers are allocated per CPU to eliminate memory contention and lock waiting when a trace event is triggered. There is a default set of buffers ready from system boot onward. However, trace point events can be directed into separate buffers. This permits several different tracing operations to occur concurrently without interfering with each other. These buffers can be recorded into files, transmitted over the network, or read from a pipe. If a system crash should occur, captured trace records still reside in these buffers and can be examined using crash dump analysis tools. The benefits of trace points Trace points can be safely placed in code that runs at interrupt context as well as code that runs in process context, unlike printk(). Also unlike printk(), individual trace points can be enabled, rather than every printk() at a particular log level. Groups of trace points can be conveniently enabled or disabled with a single operation, and can be combined with other more advanced ftrace facilities such as function_graph tracing. Trace points are designed to be low overhead, especially when they are disabled. The code that structures trace point data and inserts it into a trace buffer is out-of-line, so that a uncalled trace point adds very little instruction cache footprint. The actual code at the call site is nothing more than a load and a conditional branch. This is unlike some debugging mechanisms that place no-ops in the code, and then modify the code when they are enabled. This technique would not be effective if the executable resides in read-only memory, but a trace point in the same code can continue to work. What about printk? In contrast, printk() logs messages onto the system console and directly into the kernel's log file (typically /var/log/messages). In recent Linux distributions, kernel log output is rate-limited, which means an important but noisy stream of printk() messages can be temporarily disabled by software just before that one critical log message comes out. In addition, in lights-out environments, the console can be a serial device set to a relative low baud rate. A copious stream of printk() messages can trigger workqueue stalls or worse as the console device struggles to keep up. How do I use trace points? We've described a good way to identify and record exceptional events, using static trace points. How are the captured events recorded to a file for analysis? The trace-cmd(1) tool permits a privileged user to specify a set of events to enable and direct the output to a file or across a network, and then filter and display the captured data. This tool is packaged and available for download in Oracle Linux RPM channels. A graphical front-end for trace-cmd called kernelshark is also available. In addition, Oracle has introduced a facility for continuous monitoring of trace point events called Flight Data Recorder (FDR for short). FDR is started by systemd and enables trace points to monitor. It captures event data to a round-robin set of files, limiting the amount of data so it does not overrun the local root filesystem. A configuration file allows administrators to adjust the set of trace points that are monitored. Because this facility is always on, it can capture events at the time of a crash. The captured trace point data is available in files or it can be examined by crash analysis. To keep this article short, we've left out plenty of other benefits and details about static trace points. You can read more about them by following the links below. These links point to articles about trace point-related user space tools, clever tips and tricks, how to insert trace points into your code, and much much more. There are several links to lwn.net http://lwn.net/ above. lwn.net http://lwn.net/ is such a valuable resource to the Linux community. I encourage everyone to consider a subscription! First Failure Data Capture https://www.ibm.com/garage/method/practices/manage/first-failure-data-capture Using the Linux Kernel Tracepoints https://www.kernel.org/doc/html/latest/trace/tracepoints.html Debugging the kernel using Ftrace https://lwn.net/Articles/365835/ trace-cmd: A front-end for Ftrace https://lwn.net/Articles/410200/ Flight Data Recorder https://github.com/oracle/fdr Hist Triggers in Linux 4.7 http://www.brendangregg.com/blog/2016-06-08/linux-hist-triggers.html Ftrace: The hidden light switch https://lwn.net/Articles/608497/ Triggers for Tracing https://lwn.net/Articles/556186/ Finding Origins of Latencies Using Ftrace https://static.lwn.net/images/conf/rtlws11/papers/proc/p02.pdf

Chuck Lever is a Linux Kernel Architect working with the Oracle Linux and Unbreakable Enterprise Kernel team at Oracle. He contributed this article about replacing printk debugging with static trace...

Linux Kernel Development

XFS - Online Filesystem Checking

XFS Upstream maintainer Darrick Wong provides another instalment, this time focusing on how to facilitate sysadmins in maintaining healthy filesystems. Since Linux 4.17, I have been working on an online filesystem checking feature for XFS. As I mentioned in the previous update, the online fsck tool (named xfs_scrub) walks all internal filesystem metadata records. Each record is checked for obvious corruptions before being cross-referenced with all other metadata in the filesystem. If problems are found, they are reported to the system administrator through both xfs_scrub and the health reporting system. As of Linux 5.3 and xfsprogs 5.3, online checking is feature complete and has entered the stabilization and performance optimization stage. For the moment it remains tagged experimental, though it should be stable. We seek early adopters to try out this new functionality and give us feedback. Health Reporting A new feature under development since Linux 5.2 is the new metadata health reporting feature. In its current draft form, it collects checking and corruption reports from the online filesystem checker, and can report that to userspace via the xfs_spaceman health command. Soon, we will begin connecting it to all other places in the XFS codebase where we test for metadata problems so that administrators can find out if a filesystem observed any errors during operation. Reverse Mapping Three years ago, I also introduced the reverse space mapping feature to XFS. At its core is a secondary index of storage space usage that effectively provides a redundant copy of primary space usage metadata. This adds some overhead to filesystem operations, but its inclusion in a filesystem makes cross-referencing very fast. It is an essential feature for repairing filesystems online because we can rebuild damaged primary metadata from the secondary copy. The feature graduated from EXPERIMENTAL status in Linux 4.16 and is production ready. However, online filesystem checking and repair is (so far) the only use case for this feature, so it will remain opt-in at least until online checking graduates to production readiness. To try out this feature, pass the parameter -m rmapbt=1 to mkfs.xfs when formatting a new filesystem. Online Filesystem Repair Work has continued on online repair over the past two years. The basic core of how it works has not changed (we use reverse mapping information to reconnect damaged primary metadata), but our rigorous review processes have revealed other areas of XFS that could be improved significantly ahead of landing online repair support. For example, the offline repair tool (xfs_repair) rebuilds the filesystem btrees in bulk by regenerating all the records in memory and then writing out fully formed btree blocks all at once. The original online repair code would rebuild indices one record at a time to avoid running afoul of other transactions, which was not efficient. Because this is an opportunity to share code, I have cleaned up xfs_repair's code into a generic btree bulk load function and have refactored both repair tools to use it. Another part of repair that has been re-engineered significantly is how we stage those new records in memory. In the original design, we simply used kernel memory to hold all the records. The memory stress that this introduced made running repair a risky operation until I realized that repair should be running on a fully operational system. This means that we can store those records in memory that can be swapped out to conserve working set size. A potential third area for improvement is avoiding filesystem freezes to repair metadata. While freezing the filesystem to run a repair probably involves less downtime than unmounting, it would be very useful if we could isolate an allocation group that is found to be bad. This will reduce service impacts and is probably the only practical way to repair the reverse mapping index. I look forward to sending out a new revision of the online repair code in 2020 for further review. Demonstration: Online File System Check Online filesystem checking is a component that must be built into the Linux kernel at compile time by enabling the CONFIG_XFS_ONLINE_SCRUB kernel option. Checks are driven by a userspace utility named xfs_scrub. When run, this program announces itself as an experimental technical preview. Your kernel distributor must enable the option for the feature to work. On Debian and Ubuntu systems, the program is shipped in the regular xfsprogs package. On RedHat and Fedora systems, it is shipped in the xfsprogs-xfs_scrub package and must be installed separately. You can, of course, compile kernel and userspace from source. Let's try out the new program. It isn't very chatty by default, so we invoke it with the -v option to display status information and the -n option because we only want to check metadata: # xfs_scrub -n -v /storage/ EXPERIMENTAL xfs_scrub program in use! Use at your own risk! Phase 1: Find filesystem geometry. /storage/: using 4 threads to scrub. Phase 2: Check internal metadata. Info: AG 1 superblock: Optimization is possible. Info: AG 2 superblock: Optimization is possible. Info: AG 3 superblock: Optimization is possible. Phase 3: Scan all inodes. Info: /storage/: Optimizations of inode record are possible. Phase 5: Check directory tree. Info: inode 139431063 (1/5213335): Unicode name "arn.lm" in directory could be confused with "am.lm". Info: inode 407937855 (3/5284671): Unicode name "obs-l.I" in directory could be confused with "obs-1.I". Info: inode 407937855 (3/5284671): Unicode name "obs-l.X" in directory could be confused with "obs-1.X". Info: inode 688764901 (5/17676261): Unicode name "empty-fl.I" in directory could be confused with "empty-f1.I". Info: inode 688764901 (5/17676261): Unicode name "empty-fl.X" in directory could be confused with "empty-f1.X". Info: inode 688764901 (5/17676261): Unicode name "l.I" in directory could be confused with "1.I". Info: inode 688764901 (5/17676261): Unicode name "l.X" in directory could be confused with "1.X". Info: inode 944886180 (7/5362084): Unicode name "l.I" in directory could be confused with "1.I". Info: inode 944886180 (7/5362084): Unicode name "l.X" in directory could be confused with "1.X". Phase 7: Check summary counters. 279.1GiB data used; 3.5M inodes used. 262.2GiB data found; 3.5M inodes found. 3.5M inodes counted; 3.5M inodes checked. As you can see, metadata checking is split into different phases: This phase gathers information about the filesystem and tests whether or not online checking is supported. Here we examine allocation group metadata and aggregated filesystem metadata for problems. These include free space indices, inode indices, reverse mapping and reference count information, and quota records. In this example, the program lets us know that the secondary superblocks could be updated, though they are not corrupt. Now we scan all inodes for problems in the storage mappings, extended attributes, and directory contents, if applicable. No problems found here! Repairs are performed on the filesystem in this phase, though only if the user did not invoke the program with -n. Directories and extended attributes are checked for connectivity and naming problems. Here, we see that the program has identified several directories containing file names that could render similarly enough to be confusing. These aren't filesystem errors per se, but should be reviewed by the administrator. If enabled with -x, this phase scans the underlying disk media for latent failures. In the final phase, we compare the summary counters against what we've seen and report on the effectiveness of our scan. As you can see, we found all the files and most of the file data. Our sample filesystem is in good shape! We saw a few things that could be optimized or reviewed, but no corruptions were reported. No data have been lost. However, this is not the only way we can run xfs_scrub! System administrators can set it up to run in the background when the system is idle. xfsprogs ships with the appropriate job control files to run as a systemd timer service or a cron job. The systemd timer service can be run automatically by enabling the timer: # systemctl start xfs_scrub_all.timer # systemctl list-timers NEXT LEFT LAST PASSED UNIT ACTIVATES Thu 2019-11-28 03:10:59 PST 12h left Wed 2019-11-27 07:25:21 PST 7h ago xfs_scrub_all.timer xfs_scrub_all.service <listing shortened for brevity> When enabled, the background service will email failure reports to root. Administrators can configure when the service runs by running systemctl edit xfs_scrub_all.timer, and where the failure reports are sent by running systemctl edit xfs_scrub_fail@.service to change the EMAIL_ADDR variable. The systemd service takes advantage of systemd's sandboxing capabilities to restrict the program to idle priority and to run with as few privileges as possible. For systems that have cron installed (but not systemd), a sample cronjob file is shipped in /usr/lib/xfsprogs/xfs_scrub_all.cron. This file can be edited as necessary and copied to /etc/cron.d/. Failure reports are dispatched to wherever cronjob errors are sent. Demonstration: Health Reporting A comprehensive health report can be generated with the xfs_spaceman tool. The report contains health status about allocation group metadata and inodes in the filesystem: # xfs_spaceman -c 'health -c' /storage filesystem summary counters: ok AG 0 superblock: ok AG 0 AGF header: ok AG 0 AGFL header: ok AG 0 AGI header: ok AG 0 free space by block btree: ok AG 0 free space by length btree: ok AG 0 inode btree: ok AG 0 free inode btree: ok AG 0 overall inode state: ok <snip> inode 501370 inode core: ok inode 501370 data fork: ok inode 501370 extended attribute fork: ok This concludes our demonstrations. We hope you'll try out these new features and let us know what you think!

XFS Upstream maintainer Darrick Wong provides another instalment, this time focusing on how to facilitate sysadmins in maintaining healthy filesystems. Since Linux 4.17, I have been working on an online...

Announcements

Announcing Oracle VirtIO Drivers 1.1.5 for Microsoft Windows

We are pleased to announce Oracle VirtIO Drivers for Microsoft Windows release 1.1.5. The Oracle VirtIO Drivers for Microsoft Windows are paravirtualized (PV) drivers for Microsoft Windows guests that are running on Oracle Linux KVM. The Oracle VirtIO Drivers for Microsoft Windows improve performance for network and block (disk) devices on Microsoft Windows guests and resolve common issues. What's New? Oracle VirtIO Drivers for Microsoft Windows 1.1.5 provides: An updated installer to configure a guest VM for migration from another VM technology to Oracle Cloud Infrastructure (OCI) without the need to select a custom installation VirtIO SCSI and Block storage drivers, updated to release 1.1.5, with support for dumping crash files The signing of the drivers to Microsoft Windows 2019 The installer enables the use of the VirtIO drivers at boot time so that the migrated guest can boot in OCI Note: If installing these drivers on Microsoft Windows 2008 SP2 and 2008 R2, you will need to first install the following update from Microsoft: 2019-08 Security Update for Windows Server 2008 for x64-based Systems (KB4474419) Failure to do this may result in errors during installation due to the inability to validate signatures of the drivers. Please follow normal Windows installation procedure for this Microsoft update. Oracle VirtIO Drivers Support Oracle VirtIO Drivers 1.1.5 support the KVM hypervisor with Oracle Linux 7 on premise and on Oracle Cloud Infrastructure. The following guest Microsoft Windows operating systems are supported: Guest OS  64-bit   32-bit  Microsoft Windows Server 2019 Yes N/A  Microsoft Windows Server 2016 Yes N/A  Microsoft Windows Server 2012 R2 Yes N/A  Microsoft Windows Server 2012 Yes N/A  Microsoft Windows Server 2008 R2 SP1 Yes N/A  Microsoft Windows Server 2008 SP2 Yes Yes Microsoft Windows Server 2003 R2 SP2 Yes Yes Microsoft Windows 10 Yes Yes Microsoft Windows 8.1 Yes Yes Microsoft Windows 8 Yes Yes Microsoft Windows 7 SP1 Yes Yes Microsoft Windows Vista SP2 Yes Yes   For further details related to support and certifications, refer to the Oracle Linux 7 Administrator's Guide. Additional information on the Oracle VirtIO Drivers 1.1.5 certifications can be found in the Windows Server Catalog. Downloading Oracle VirtIO Drivers Oracle VirtIO Drivers release 1.1.5 is available on the Oracle Software Delivery Cloud by searching on "Oracle Linux" and select "DLP:Oracle Linux 7.7.0.0.0 ( Oracle Linux )" Click on the "Add to Cart" button and then click on "Checkout" in the right upper corner. On the following window, select "x86-64" and click on the "Continue" button: Accept the "Oracle Standard Terms and Restrictions" to continue and, on the following window, click on "V984560-01.zip - Oracle VirtIO Drivers Version for Microsoft Windows 1.1.5" to download the drivers: Oracle Linux Resources Documentation Oracle Linux Virtualization Manager Documentation Oracle VirtIO Drivers for Microsoft Windows Blogs Oracle Linux Blog Oracle Virtualization Blog Community Pages Oracle Linux Product Training and Education Oracle Linux Administration - Training and Certification Data Sheets, White Papers, Videos, Training, Support & more Oracle Linux Social Media Oracle Linux on YouTube Oracle Linux on Facebook Oracle Linux on Twitter

We are pleased to announce Oracle VirtIO Drivers for Microsoft Windows release 1.1.5. The Oracle VirtIO Drivers for Microsoft Windows are paravirtualized (PV) drivers for Microsoft Windows guests that...

Comparing Workload Performance

In this blog post, Oracle Linux performance engineer Jesse Gordon presents an alternate approach to comparing the performance of a workload when measured in two different scenarios.  This improves on the traditional "perf diff" method. The benefits of this approach are as follows: ability to compare based on either inclusive time (time spent in a given method and all the methods it calls) or exclusive time (time spent only in a given method) fields in perf output can be applied to any two experiments that have common function names more readable output Comparing Perf Output from Different Kernels You’ve just updated your Oracle Linux kernel – or had it updated autonomously -- and you notice that the performance of your key workload has changed.  How do you figure out what is responsible for the difference?  The basic tool for this task is the perf profile 1, which can be used to generate traces of the workload on the two kernels.  Once you have the two perf outputs, the current Linux approach is to use "perf diff" 2 to compare the resulting traces.  The problem with the approach is that "perf diff" output is neither easy to read nor to use.  Here is an example: # # Baseline Delta Abs Shared Object Symbol # ........ ......... ................................... .............................................. # +3.38% [unknown] [k] 0xfffffe0000006000 29.46% +0.98% [kernel.kallsyms] [k] __fget 8.42% +0.91% [kernel.kallsyms] [k] fput +0.88% [kernel.kallsyms] [k] entry_SYSCALL_64_after_hwframe +0.68% [kernel.kallsyms] [k] syscall_trace_enter 2.98% -0.67% [kernel.kallsyms] [k] _raw_spin_lock +0.55% [kernel.kallsyms] [k] do_syscall_64 0.40% -0.34% syscall [.] [main] In this blog, we outline an alternate approach which produces easier to read and use output.  Here is what the above output looks like using this approach: Command Symbol Before# After# Delta -------------------- ------------------------------ ------- ------- ------- syscall __fget 29.46 30.43 0.97 syscall fput 8.41 9.33 0.92 syscall entry_SYSCALL_64_after_hwframe 0.00 0.88 0.88 syscall syscall_trace_enter 0.00 0.68 0.68 syscall _raw_spin_lock 2.98 2.31 -0.67 syscall do_syscall_64 0.00 0.55 0.55 syscall main 0.40 0.06 -0.34 Furthermore, this alternate approach extends the comparison options, allowing one to compare based on any of the fields in the perf output report.  In the remainder of this blog, we detail the steps involved in producing such output.   Step 1: Generate the perf traces Taking a trace involves running the workload while invoking perf.  In this article, we chose to use the syscall workload from UnixBench 3 suite, a typical sequence would be: $ perf record -a -g -c 1000001 \<PATH-TO\>/byte-unixbench-master/UnixBench/Run syscall -i 1 -c 48 where: -a asks perf to monitor all online CPUs; -g asks perf to collect data so call graphs (stack traces) may be generated; -c 1000001 asks perf to collect a sample once every 1000001 cycles Step 2: Post-process the trace data Samples collected by perf record are saved into a binary file called, by default, perf.data. The "perf report" command reads this file and generates a concise execution profile. By default, samples are sorted by functions with the most samples first.  To post-process the perf.data file generated in step 1: $ mv perf.data perf.data.KERNEL $ perf report -i perf.data.KERNEL -n > perf.report.KERNEL Step 3: Compare the traces To be able to compare the two traces, first ensure that they are in a common directory on the system.  So, we would have, for example, perf.report.KERNEL1 and perf.report.KERNEL2.  This is what one such trace profile looks like for UnixBench syscall: # # Samples: 1M of event 'cycles' # Event count (approx.): 1476340476339 # # Children Self Samples Command Shared Object Symbol # ........ ........ ............ ............... .................................. .................................................... # 98.60% 0.00% 0 syscall [unknown] [.] 0x7564207325203a65 | ---0x7564207325203a65 85.91% 0.24% 3538 syscall [kernel.kallsyms] [k] system_call_fastpath | ---system_call_fastpath | |--60.76%-- __GI___libc_close | 0x7564207325203a65 | |--37.72%-- __GI___dup | 0x7564207325203a65 | |--1.30%-- __GI___umask | 0x7564207325203a65 --0.21%-- [...] Listing 1: example perf trace profile The columns of interest shown are as follows: Children -- the percent of time spent in this method and all the methods that it calls, also referred to as inclusive time Self -- the percent of time spent in this method only, also referred to as exclusive time Samples -- the number of trace samples that fell in this method only Command -- the process name Shared Object -- the library Symbol -- the method (or function) name Now, we can use perf diff as follows: $ perf diff perf.data.KERNEL1 perf.data.KERNEL2 > perf.diff.KERNEL1.vs.KERNEL2   Here is what the resulting output looks like: # # Baseline Delta Abs Shared Object Symbol # ........ ......... ................................... .............................................. # +3.38% [unknown] [k] 0xfffffe0000006000 29.46% +0.98% [kernel.kallsyms] [k] __fget 8.42% +0.91% [kernel.kallsyms] [k] fput +0.88% [kernel.kallsyms] [k] entry_SYSCALL_64_after_hwframe +0.68% [kernel.kallsyms] [k] syscall_trace_enter 2.98% -0.67% [kernel.kallsyms] [k] _raw_spin_lock +0.55% [kernel.kallsyms] [k] do_syscall_64 0.40% -0.34% syscall [.] main Listing 2: example perf diff profile trace This output, by default, has done the comparison using the “Self” column, or time spent in just this one method.  This can be useful output, but is often insufficient as part of a performance analysis.  We next present an approach to comparing using the “Children” column, for time spent in this method and all its children.  Step 4: Generate comparison using the “Children” column To perform the comparison, we first extract all of the lines that have entries in all six columns i.e., all fields are present.  These are the lines at the top of each of the call graphs. You can find the allfields.delta.py program that we use to render these results on github at https://github.com/oracle/linux-blog-sample-code/tree/comparing-workload-performance/allfields.delta.py $ grep "\\[" perf.data.DESCRIPTOR | grep -v "|" | grep -v "\\-\\-" > perf.report.DESCRIPTOR.allfields The output of this script looks as follows: 98.60% 0.00% 0 syscall [unknown] [.] 0x7564207325203a65 85.91% 0.24% 3538 syscall [kernel.kallsyms] [k] system_call_fastpath 55.20% 0.16% 2403 syscall libc-2.17.so [.] __GI___libc_close 52.27% 0.14% 2020 syscall [kernel.kallsyms] [k] sys_close 52.11% 0.08% 1207 syscall [kernel.kallsyms] [k] __close_fd 50.39% 21.98% 324434 syscall [kernel.kallsyms] [k] filp_close 35.44% 0.13% 1958 syscall libc-2.17.so [.] __GI___dup 32.39% 0.15% 2181 syscall [kernel.kallsyms] [k] sys_dup 29.46% 29.46% 434902 syscall [kernel.kallsyms] [k] __fget 19.92% 19.92% 294070 syscall [kernel.kallsyms] [k] dnotify_flush Listing 3: perf output showing lines with all fields present Now we compare two "allfields" files, using a Python script which reads in the two files and compares lines for which the combination of SharedObject + Symbol are the same.  This script allows the user to compare based on each of the three left side columns (children, self, or samples) and would be run as follows: $ allfields.delta.py -b perf.report.KERNEL1.allfields -a perf.report.KERNEL2.allfields -d children > allfields.delta.children.KERNEL1.vs.KERNEL2 For the UnixBench syscall workload, comparing a two distinct kernels, the output would look like this: perf report allfields delta report before file name == perf.report.KERNEL1.allfields after file name == perf.report.KERNEL2.allfields delta type == children Command Symbol Before# After# Delta -------------------- ------------------------------ ------- ------- ------- syscall 0x7564207325203a65 98.60 99.81 1.21 syscall system_call_fastpath 85.91 0.00 -85.91 syscall __GI___libc_close 55.20 56.73 1.53 syscall sys_close 52.27 53.69 1.42 syscall __close_fd 52.11 53.62 1.51 [...] Listing 4: example output from script, comparing using "children" field Lastly, we can sort this output to highlight the largest differences in each direction, as follows: $ sort -rn -k 5 allfields.delta.children.KERNEL1.vs.KERNEL2 | less where the head of the file shows those methods where more time was spent in KERNEL1 and the tail of the file shows those methods where more time was spent in KERNEL2: syscall entry_SYSCALL_64_after_hwframe 0.00 92.18 92.18 syscall do_syscall_64 0.00 91.07 91.07 syscall filp_close 50.39 52.70 2.31 syscall syscall_slow_exit_work 0.00 1.67 1.67 syscall __GI___libc_close 55.20 56.73 1.53 [...] syscall tracesys 1.18 0.00 -1.18 syscall syscall_trace_leave 1.70 0.00 -1.70 syscall int_very_careful 1.83 0.00 -1.83 syscall system_call_after_swapgs 2.42 0.00 -2.42 syscall system_call 3.47 0.00 -3.47 syscall system_call_fastpath 85.91 0.00 -85.91 Listing 5: sorted output of script We may now use these top and bottom methods as starting points into root causing the performance differences observed when executing the workload on the two kernels. Summary We have presented an alternate approach to comparing the performance of a workload when measured in two different scenarios.  This method can be applied to any two experiments that have common function names.  The benefits of this approach are as follows: ability to compare based on either inclusive time (Children) or exclusive time (Self) fields in perf output more readable output Please try it out. perf: Linux profiling with performance counters↩ perf-diff man page↩ UnixBench on GitHub↩

In this blog post, Oracle Linux performance engineer Jesse Gordon presents an alternate approach to comparing the performance of a workload when measured in two different scenarios.  This improves on...

Announcements

Announcing Oracle Linux 7 Update 8 Beta Release

We are pleased to announce the availability of the Oracle Linux 7 Update 8 Beta release for the 64-bit Intel and AMD (x86_64) and 64-bit Arm (aarch64) platforms. Oracle Linux 7 Update 8 Beta is an updated release that include bug fixes, security fixes and enhancements. It is fully binary compatible with Red Hat Enterprise Linux 7 Update 8 Beta. Updates include: A revised protection profile for General Purpose Operating Systems (OSPP) in the SCAP Security Guide packages SELinux enhancements for Tomcat domain access and graphical login sessions rsyslog has a new option for managing letter-case preservation by using the FROMHOST property for the imudp and imtcp modules Pacemaker concurrent-fencing cluster property defaults to true, speeding up recovery in a large cluster where multiple nodes are fenced. The Oracle Linux 7 Update 8 Beta Releases includes the following kernel packages: kernel-uek-4.14.35-1902.7.3.1 for x86_64 an d aarch64 platforms - The Unbreakable Enterprise Kernel Release 5, which is the default kernel. kernel-3.10.0-1101 for x86_64 platform - The latest Red Hat Compatible Kernel (RHCK). To get started with Oracle Linux 7 Update 8 Beta Release, you can simply perform a fresh installation by using the ISO images available for download from Oracle Technology Network. Or, you can perform an upgrade from an existing Oracle Linux 7 installation by using the Beta channels for Oracle Linux 7 Update 8 on the Oracle Linux yum server or the Unbreakable Linux Network (ULN).  # vi /etc/yum.repos.d/oracle-linux-ol7.repo [ol7_beta] name=Oracle Linux $releasever Update 8 Beta ($basearch) baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/beta/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1 [ol7_optional_beta] name=Oracle Linux $releasever Update 8 Beta ($basearch) Optional baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/optional/beta/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1 If your instance is running on OCI, the value "$ociregion" will be automatically valued to use OCI local-region Yum Mirrors. Modify the yum channel setting and enable the Oracle Linux 7 Update 8 Beta channels. Then you perform the upgrade. # yum update After the upgrade is completed, reboot the system and you will have Oracle Linux 7 Update 8 Beta running. [root@v2v-app: ~]# cat /etc/oracle-release Oracle Linux Server release 7.8 This release is provided for development and test purposes only and is not covered by Oracle Linux support. Oracle does not recommended using Beta releases in production. Further technical details and known issues for Oracle Linux 7 Update 8 Beta Release are available on Oracle Community - Oracle Linux and UEK Preview space. We welcome your questions and feedback on Oracle Linux 7 Update 8 Beta Release. You may contact the Oracle Linux team at oraclelinux-info_ww_grp@oracle.com or post your questions and comments on the Oracle Linux and UEK Preview Space on the Oracle Community.

We are pleased to announce the availability of the Oracle Linux 7 Update 8 Beta release for the 64-bit Intel and AMD (x86_64) and 64-bit Arm (aarch64) platforms. Oracle Linux 7 Update 8 Beta is an...

Announcements

UEK Release 6 Developer Preview available for Oracle Linux 7 and Oracle Linux 8

The Unbreakable Enterprise Kernel (UEK), included as part of Oracle Linux, provides the latest open source innovations, optimizations and security for enterprise cloud workloads. The UEK Release 5, based on the upstream kernel 4.14, is the current UEK release that powers the production workloads on Oracle Linux 7 in the cloud or on-premises. Linux 5.4 is the Latest Stable Kernel release, and it is the mainline kernel that the UEK Release 6 tracks. You can experiment the UEK Release 6 preview today with Oracle Linux 7 and Oracle Linux 8 on both x86_64 and aarch64 platforms. The example below is using an Oracle Linux 8 x86_64 instance on Oracle Cloud Infrastructure. The kernel was upgraded to the UEK Release 6 preview within a few minutes. The same upgrade procedures apply to an Oracle Linux 7 or Oracle Linux 8 instance running on-premises. The Oracle Linux 8 instance runs the current RHCK (Red Hat Compatible Kernel). [root@ol8-uek6 ~]# uname -a Linux ol8-uek6 4.18.0-147.el8.x86_64 #1 SMP Tue Nov 12 11:05:49 PST 2019 x86_64 x86_64 x86_64 GNU/Linux Update the system: [root@ol8-uek6 ~]# yum update -y Enable "ol8_developer_UEKR6" UEK Release 6 Preview Channel: [root@ol8-uek6 ~]# dnf config-manager --set-enabled ol8_developer_UEKR6 Run "dnf" command to perform the UEKR6 Developer Preview installation: [root@ol8-uek6 ~]# dnf install kernel-uek kernel-uek-devel Reboot the Oracle Linux 8 instance to have the new kernel take effect. When the Oracle Linux 8 instance comes back, you now have the UEK Release 6 preview  running. [root@ol8-uek6 ~]# uname -a Linux ol8-uek6 5.4.2-1950.2.el8uek.x86_64 #2 SMP Thu Dec 19 17:07:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux Further technical details and known issues on UEK6 are available on this dedicated article at Oracle Community - Oracle Linux and UEK Preview space. If you have any questions, post them to Oracle Linux Community.

The Unbreakable Enterprise Kernel (UEK), included as part of Oracle Linux, provides the latest open source innovations, optimizations and security for enterprise cloud workloads. The UEK Release 5,...

Linux Kernel Development

XFS - Data Block Sharing (Reflink)

Following on from his recent blog XFS - 2019 Development Retrospective, XFS Upstream maintainer Darrick Wong dives a little deeper into the Reflinks implementation for XFS in the mainline Linux Kernel. Three years ago, I introduced to XFS a new experimental "reflink" feature that enables users to share data blocks between files. With this feature, users gain the ability to make fast snapshots of VM images and directory trees; and deduplicate file data for more efficient use of storage hardware. Copy on write is used when necessary to keep file contents intact, but XFS otherwise continues to use direct overwrites to keep metadata overhead low. The filesystem automatically creates speculative preallocations when copy on write is in use to combat fragmentation. I'm pleased to announce with xfsprogs 5.1, the reflink feature is now production ready and enabled by default on new installations, having graduated from the experimental and stabilization phases. Based on feedback from early adopters of reflink, we also redesigned some of our in-kernel algorithms for better performance, as noted below: iomap for Faster I/O Beginning with Linux 4.18, Christoph Hellwig and I have migrated XFS' IO paths away from the old VFS/MM infrastructure, which dealt with IO on a per-block and per-block-per-page ("bufferhead") basis. These mechanisms were introduced to handle simple filesystems on Linux in the 1990s, but are very inefficient. The new IO paths, known as "iomap", iterate IO requests on an extent basis as much as possible to reduce overhead. The subsystem was written years ago to handle file mapping leases and the like, but nowadays we can use it as a generic binding between the VFS, the memory manager, and XFS whenever possible. The conversion finished as of Linux 5.4. In-Core Extent Tree For many years, the in-core file extent cache in XFS used a contiguous chunk of memory to store the mappings. This introduces a serious and subtle pain point for users with large sparse files, because it can be very difficult for the kernel to fulfill such an allocation when memory is fragmented. Christoph Hellwig rewrote the in-core mapping cache in Linux 4.15 to use a btree structure. Instead of using a single huge array, the btree structure reduces our contiguous memory requirements to 256 bytes per chunk, with no maximum on the number of chunks. This enables XFS to scale to hundreds of millions of extents while eliminating a source of OOM killer reports. Users need only upgrade their kernel to take advantage of this improvement. Demonstration: Reflink To begin experimenting with XFS's reflink support, one must format a new filesystem: # mkfs.xfs /dev/sda1 meta-data=/dev/sda1 isize=512 agcount=4, agsize=6553600 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 data = bsize=4096 blocks=26214400, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=12800, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 If you do not see the exact phrase "reflink=1" in the mkfs output then your system is too old to support reflink on XFS. Now one must mount the filesystem: # mount /dev/sda1 /storage At this point, the filesystem is ready to absorb some new files. Let's pretend that we're running a virtual machine (VM) farm and therefore need to manage deployment images. This and the next example are admittedly contrived, as any serious VM and container farm manager takes care of all these details. # mkdir /storage/images # truncate -s 30g /storage/images/os8_base.img # qemu-system-x86_64 -hda /storage/images/os8_base.img -cdrom /isoz/os8_install.iso Now we install a base OS image that we will later use for fast deployment. Once that's done, we shut down the QEMU process. But first, we'll check that everything's in order: # xfs_bmap -e -l -p -v -v -v /storage/images/os8_base.img /storage/images/os8_base.img: EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS 0: [0..15728639]: 52428960..68157599 1 (160..15728799) 15728640 000000 <listing shortened for brevity> # df -h /storage Filesystem Size Used Avail Use% Mounted on /dev/sda1 100G 32G 68G 32% /storage Now, let's say that we want to provision a new VM using the base image that we just created. In the old days we would have had to copy the entire image, which can be very time consuming. Now, we can do this very quickly: # /usr/bin/time cp -pRdu --reflink /storage/images/os8_base.img /storage/images/vm1.img 0.00user 0.00system 0:00.02elapsed 39%CPU (0avgtext+0avgdata 2568maxresident)k 0inputs+0outputs (0major+108minor)pagefaults 0swaps # xfs_bmap -e -l -p -v -v -v /storage/images/vm1.img /storage/images/vm1.img: EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS 0: [0..15728639]: 52428960..68157599 1 (160..15728799) 15728640 100000 <listing shortened for brevity> FLAG Values: 0100000 Shared extent 0010000 Unwritten preallocated extent 0001000 Doesn't begin on stripe unit 0000100 Doesn't end on stripe unit 0000010 Doesn't begin on stripe width 0000001 Doesn't end on stripe width # df -h /storage Filesystem Size Used Avail Use% Mounted on /dev/sda1 100G 32G 68G 32% /storage This was a very quick copy! Notice how the extent map on the new image file shows file data pointing to the same physical storage as the original base image, but is now marked as a shared extent, and there's about as much free space as there was before the copy. Now let's start that new VM and let it run for a little while before re-querying the block mapping: # xfs_bmap -e -l -p -v -v -v /storage/images/os8_base.img /storage/images/vm1.img: EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS 0: [0..15728639]: 52428960..68157599 1 (160..15728799) 15728640 100000 <listing shortened for brevity> # xfs_bmap -e -l -p -v -v -v /storage/images/vm1.img /storage/images/vm1.img: EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS 0: [0..255]: 102762656..102762911 1 (50333856..50334111) 256 000000 1: [256..15728639]: 52429216..68157599 1 (416..15728799) 15728384 100000 <listing shortened for brevity> # df -h /storage Filesystem Size Used Avail Use% Mounted on /dev/sda1 100G 36G 64G 32% /storage Notice how the first 128K of the file now points elsewhere. This is evidence that the VM guest wrote to its storage, causing XFS to employ copy on write on the file so that the original base image remains unmodified. We've apparently used another 4GB of space, which is far better than the 64GB that would have been required in the old days. Let's turn our attention to the second major feature for reflink: fast(er) snapshotting of directory trees. Suppose now that we want to manage containers with XFS. After a fresh formatting, create a directory tree for our container base: # mkdir -p /storage/containers/os8_base In the directory we just created, install a base container OS image that we will later use for fast deployment. Once that's done, we shut down the container and check that everything's in order: # df /storage/ Filesystem Size Used Avail Use% Mounted on /dev/sda1 100G 2.0G 98G 2% /storage # xfs_bmap -e -l -p -v -v -v /storage/containers/os8_base/bin/bash /storage/containers/os8_base/bin/bash: EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS 0: [0..2175]: 52440384..52442559 1 (11584..13759) 2176 000000 Ok, that looks like a reasonable base system. Let's use reflink to make a fast copy of this system: # /usr/bin/time cp -pRdu --reflink=always /storage/containers/os8_base /storage/containers/container1 0.01user 0.64system 0:00.68elapsed 96%CPU (0avgtext+0avgdata 2744maxresident)k 0inputs+0outputs (0major+129minor)pagefaults 0swaps # xfs_bmap -e -l -p -v -v -v /storage/containers/os8_base/bin/bash /storage/containers/os8_base/bin/bash: EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS 0: [0..2175]: 52440384..52442559 1 (11584..13759) 2176 100000 # df /storage/ Filesystem Size Used Avail Use% Mounted on /dev/sda1 100G 2.0G 98G 2% /storage Now we let the container runtime do some work and update (for example) the bash binary: # xfs_bmap -e -l -p -v -v -v /storage/containers/os8_base/bin/bash /storage/containers/os8_base/bin/bash: EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS 0: [0..2175]: 52440384..52442559 1 (11584..13759) 2176 000000 # xfs_bmap -e -l -p -v -v -v /storage/containers/container1/bin/bash /storage/containers/container1/bin/bash: EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS 0: [0..2175]: 52442824..52444999 1 (14024..16199) 2176 000000 Notice that the two copies of bash no longer share blocks. This concludes our demonstration. We hope you enjoy this major new feature!

Following on from his recent blog XFS - 2019 Development Retrospective, XFS Upstream maintainer Darrick Wong dives a little deeper into the Reflinks implementation for XFS in the mainline Linux...

Linux Kernel Development

XFS - 2019 Development Retrospective

Darrick Wong, Upstream XFS Maintainer and kernel developer for Oracle Linux, returns to talk about what's been happening with XFS. Hi folks! It has been a little under two years since my last post about upcoming XFS features in the mainline Linux kernel. In that time, the XFS development community have been hard at work fixing bugs and rolling out new features! Let's talk about the improvements that have landed recently in the mainline Linux Kernel, and our development roadmap for 2020. The new reflink and online fsck features will be covered in separate future blog posts. Lazy Timestamp Updates Starting with Linux 4.17, XFS implements the lazytime mount option. This mount option permits the filesystem to skip updates to the last modification timestamp and file metadata change timestamp if they have been updated within the last 24 hours. When used in combination with the relatime mount option to skip updates to a last access timestamp when it is newer than the file modification timestamp, we see a marked decrease in metadata writes, which in turn improves filesystem performance on non-volatile storage. This enhancement was provided by Christoph Hellwig. Filesystem Label Management In Linux 4.18, Eric Sandeen added to XFS support for btrfs' label get and set ioctls. This change enables administrators to change a filesystem label while that filesystem is mounted. A future xfsprogs release will adapt xfs_admin to take advantage of this interface. Large Directory Dave Chinner contributed a series of patches for Linux 5.4 that reduce the amount of time that XFS spends searching for free space in a directory when creating a file. This change improves performance on very large directories, which should be beneficial for object stores and container deployment systems. Solving the Y2038 Problem The year 2038 poses a special problem for Linux -- any signed 32-bit seconds counter will overflow back to 1901. Work is underway in the kernel to extend all of those counters to support 64-bit counters fully. In 2020, we will begin work on extending XFS's metadata (primarily inode timestamps and quota expiration timer) to support timestamps out to the year 2486. It should be possible to upgrade to existing V5 filesystems. Metadata Directory Tree This feature, which I showed off late in 2018, creates a separate directory tree for filesystem metadata. This feature is not itself significant for users, but it will enable the creation of many more metadata structures. This in turn can enable us to provide reverse mapping and data block sharing for realtime volumes; support creating subvolumes for container hosts; store arbitrary properties in the filesystem; and attach multiple realtime volumes to the filesystem. Deferred Inode Reclaim and Inactivation We frequently hear two complaints lodged against XFS -- memory reclamation runs very slowly because XFS inode reclamation sometimes has to flush dirty inodes to disk; and deletions are slow because we charge all costs of freeing all the file's resources to the process deleting files. Dave Chinner and I have been collaborating this year and last on making those problems go away. Dave has been working on replacing the current inode memory reclaim code with a simpler LRU list and reorganizing the dirty inode flushing code so that inodes aren't handed to memory reclaim until the metadata log has finished flushing the inodes to disk. This should eliminate the complaints that slow IO gets in the way of reclaiming memory in other parts of the system. Meanwhile, I have been working on the deletion side of the equation by adding new states to the inode lifecycle. When a file is deleted, we can tag it as needing to have its resources freed, and move on. A background thread can free all those resources in bulk. Even better, on systems with a lot of IOPs available, these bulk frees can be done on a per-AG basis with multiple threads. Inode Parent Pointers Allison Collins continues developing the inode parent pointer feature. This has led to the introduction of atomic setting and removal of extended attributes and a refactoring of the existing extended attribute code. When completed, this will enable both filesystem check and repair tools to check the integrity of a filesystem's directory tree and rebuild subtrees when they are damaged. Anyway, that wraps up our new feature retrospective and discussion of 2020 roadmap! See you on the mailing lists!

Darrick Wong, Upstream XFS Maintainer and kernel developer for Oracle Linux, returns to talk about what's been happening with XFS. Hi folks! It has been a little under two years since my last post about...

Announcements

Announcing Oracle Container Runtime for Docker Release 19.03

Oracle is pleased to announce the release of Oracle Container Runtime for Docker version 19.03. Oracle Container Runtime allows you to create and distribute applications across Oracle Linux systems and other operating systems that support Docker. Oracle Container Runtime for Docker consists of the Docker Engine, which packages and runs the applications, and integrates with the Oracle Container Registry and Docker Hub to share the applications in a Software-as-a-Service (SaaS) cloud. Notable Updates The docker run and docker create commands now include an option to set the domain name, using the --domainname option. The docker image pull command now includes an option to quietly pull an image, using the --quiet option. Faster context switching using the docker context command. Added ability to list kernel capabilities with --capabilities instead of --capadd and --capdrop. Added ability to define sysctl options with--sysctl list, --sysctl-add list, and --sysctl-rm list. Added inline cache support to builder with the --cache-from option. The IPVLAN driver is now supported and no longer considered experimental. Upgrading To learn how to upgrade from a previously supported version of Oracle Container Runtime for Docker, please review the Upgrading Oracle Container Runtime for Docker chapter of the documentation. Note that upgrading from a developer preview release is not supported by Oracle. Support Support for the Oracle Container Runtime for Docker is available to customers with either an Oracle Linux Premier or Basic support subscription.  Resources Documentation Oracle Container Runtime for Docker Oracle Linux Cloud Native Environment Oracle Linux Software Download Oracle Linux download instructions Oracle Software Delivery Cloud Oracle Container Registry Oracle Groundbreakers Community Oracle Linux Space Social Media Oracle Linux on YouTube Oracle Linux on Facebook Oracle Linux on Twitter Product Training and Education Oracle Linux

Oracle is pleased to announce the release of Oracle Container Runtime for Docker version 19.03. Oracle Container Runtime allows you to create and distribute applications across Oracle Linux systems...

Technologies

Kata Containers: What, When and How

When we began work to include Kata Containers with Oracle Linux Cloud Native Environment I was immediately impressed with the change they bring to the security boundary of containers but I had to wonder, how does it work? This article attempts to briefly cover the What, When and How of Kata Containers. Before we dive into Kata Containers you may want to read the brief history of Linux containers. 1. What are Kata Containers? Kata Containers is an open source [project with a] community working to build a secure container runtime with lightweight virtual machines that feel and perform like containers, but provide stronger workload isolation using hardware virtualization technology as a second layer of defense. Kata Containers stem from the Intel® Clear Containers and Hyper RunV projects. Kata Containers use existing CPU features like Intel VT-X and AMD-V™ to better isolate containers from each other when run on the same host. Each container can run in its own VM and have its own Linux Kernel. Due to the boundaries between VMs a container should not be able to access the memory of another container (Hypervisors+EPT/RVI). runc is the runtime-spec reference implementation on Linux and when it spawns containers it uses standard Linux Kernel features like AppArmour, capabilities(7), Control Groups, seccomp, SELinux and namespaces(7) to control permissions and flow of data in and out of the container. Kata Containers extends this by wrapping the containers in VMs. 2. When should I use Kata Containers? runc is the most common container runtime, the default for Docker™, CRI-O and in turn Kubernetes®. Kata Containers give you an alternative, one which provides higher isolation for mixed-use or multi-tenant environments. Kubernetes worker nodes are capable of using both runc and Kata Containers simultaneously so dedicated hardware is not required. For intra-container communication efficiency and to reduce resource usage overhead, Kata Containers executes all containers of a Kubernetes pod in a single VM.   Deciding when to use runc and when to use Kata Containers is dependent on your own security policy and posture. Factors that may influence when higher levels of isolation are necessary include: The source of the image - trusted vs untrusted. Was the image built in-house or downloaded from a public registry? The contents of the container In-house software that brings a competitive advantage The dataset the container works on (public vs confidential) Working in a virtual environment may impact performance so workload-specific testing is recommended to evaluate the extent, if any, of that impact in your environment. 3. How do Kata Containers work? When installing the Kubernetes module of Oracle Linux Cloud Native Environment both runc and Kata Containers are deployed along with CRI-O, which provides the necessary support between Kubernetes and the container runtimes. A heavily optimized and purpose-tuned Linux Kernel is used by Kata Containers to boot the VM. This is paired with a minimized user space to support container operations and together they provide fast initialization. In order to create a Kata Container, a Kubernetes user must initially create a RuntimeClass object. After that Pods or Deployments can reference the RuntimeClass to indicate the runtime to use. Examples are available in the Using Container Runtimes documentation. Kata Containers are designed to provide "lightweight virtual machines that feel and perform like containers"; your developers shouldn't need to be aware that their code is executing in a VM and should not need to change their workflow to gain the benefits. Trademarks Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

When we began work to include Kata Containers with Oracle Linux Cloud Native Environment I was immediately impressed with the change they bring to the security boundary of containers but I had to...

Linux

Oracle Linux Training at Your Own Pace

Knowing that taking training at your own pace, when you have time, suits many people's schedules and learning style, Oracle has just releases new Training-on-Demand courses for those aspiring to build their Linux administration skills. Why not take advantage to the newly released training to build your Linux skills. Start your Linux learning with the Oracle Linux System Administration I course. This course covers a range of skills including installation, using the Unbreakable Enterprise Kernel, configuring Linux services, preparing the system for the Oracle Database, monitoring and troubleshooting. After gaining essential knowledge and skills from taking the Oracle Linux System Administration I course, students are encouraged to continue their Linux learning with Oracle Linux System Administration II. The Oracle Linux System Administration II course teaches you how to automate the installation of the operating system and implement advanced software package management. How to configure advanced networking and authentication services. Resources: Oracle Linux Curriculum Oracle Linux Product Documentation Linux on Oracle Cloud Infrastructure learning path Oracle Linux Cloud Native Environment learning path Linux Containers and Orchestration Groundbreakers Community

Knowing that taking training at your own pace, when you have time, suits many people's schedules and learning style, Oracle has just releases new Training-on-Demand courses for those aspiring to build...

Events

Meet the Oracle Linux Team at Open FinTech Forum in New York

For IT decision makers in the financial services sector, you won’t want to miss Open FinTech Forum, December 9, 2019, at the Convene Conference Center at One Liberty Plaza, New York, NY. This event is designed to better inform you about the open technologies driving digital transformation, and how to best utilize an open source strategy. This information-packed day starts with several brief keynotes. Be sure to mark your schedule and join Robert Shimp, Group Vice President of Infrastructure Software Product Management at Oracle, for the keynote: A New Blueprint for Modern Application Development and Runtime Environment Mr. Shimp will discuss new open source technologies that make it easier and faster than ever to design and deliver modern cloud native applications. When: Monday, December 9, 2019 Time: 10:05 a.m. Location: The Forum Meet Our Experts Register for Open FinTech Forum today and stop by Oracle’s table to chat with our Linux experts. Learn more about Oracle Linux and how it delivers a complete, open DevOps environment featuring leading performance, scalability, reliability and security for enterprise applications deployed in the cloud or on premise. One of the most secure Linux environments available with certification from Common Criteria as well as FIPS 140-2 validation of its cryptographic modules, Oracle Linux is currently the only Linux distribution on the NIAP Product Compliant List. It is also the only Linux with Ksplice zero-downtime automated patching for kernel, hypervisor, and critical user space libraries. We look forward to meeting you at Open FinTech Forum. #osfintech    #OracleLinux

For IT decision makers in the financial services sector, you won’t want to miss Open FinTech Forum, December 9, 2019, at the Convene Conference Center at One Liberty Plaza, New York, NY. This event is...

Linux

A Brief History of Linux Containers

The latest update to Oracle Linux Cloud Native Environment introduces new functionally that we'll cover in upcoming posts but before we dive into those features, let's take a look at the history of Linux containers to see how we got here. The first fundamental building block that led to the creation of Linux containers was submitted to the Kernel by Google. It was the first version of a feature named control groups or cgroups. A cgroup is a collection of processes whose use of system resources is constrained by the Kernel to better manage completing workloads and to contain their impact on other processes. The second building block was the namespaces feature which allows the system to apply a restricted view of system resources to processes or groups of processes. Namespaces were actually introduced much earlier than cgroups but they were limited to specific object types like hostnames and Process IDs. It wasn't until 2008 and the creation of network namespaces that we could create different views of key network objects for different processes. Processes could now be prevented from knowing about each other, communicating with each other and each could have a unique network configuration. The availability of these Kernel features led to the formation of LXC (Linux Containers) which provides a simple interface to create and manage containers, which are simply processes that are limited in what they can see by namespaces and what they can use by cgroups. Docker expanded LXC's functionality by providing a full container life-cycle management tool (also named Docker™). Docker's popularity led to its name now being synonymous with containers. In time Docker replaced LXC with its own libcontainer and additional controls were added which utilized Kernel features such as AppAmor, capabilities, seccomp and SELinux. These gave developers improved methods of restricting what container processes could see and do. A key component to Docker's success was the introduction of a container and image format for portability, i.e. a container or image could be transferred between systems without any impact to functionality. This provided the assurance of repeatable, consistent deployments. This container and image format is based on individual file system layers where each layer is intentionally separated for re-use but is presented as a unified file system when the container starts. Layers also allow images to extend another image. For example, an image may use oraclelinux:7-slim as its first layer and add additional software in other layers. This separation of layers allows images and containers to share the same bits on disk across multiple instances. This improves resource utilization and start-up time. A new API was created by Docker to facilitate image transfer but pre-existing union filesystems like aufs and then OverlayFS were the base methods to present the unified container filesystem. While most of us are familiar with Docker, what is less well-known is that those container and image formats and how a container is launched from an image are published standards of the Open Container Initiative. These standards are designed for interoperability so any runtime-spec compliant runtime can use an image-spec compliant image to launch a container. Docker was a founding member of the Open Container Initiative and contributed the Docker V2 Image specification to act as the basis of the image specification. Through standards like these, interoperability is enhanced which helps the industry continue to develop and grow at a rapid pace. So if you're creating images today with Docker or other Open Container Initiative compliant tools, they can continue to work on other compliant tools like Kata containers which we'll be looking at in an upcoming blog post. Note: There were alternatives available in other operating systems and outside of mainline Linux prior to LXC but the focus of the article was Linux. Similarly, there were other projects in parallel to LXC which contributed to the industry but are not mentioned for brevity. Docker™ is a trademark of Docker, Inc. in the United States and/or other countries. Linux® is a registered trademark of Linus Torvalds in the United States and/or other countries.

The latest update to Oracle Linux Cloud Native Environment introduces new functionally that we'll cover in upcoming posts but before we dive into those features, let's take a look at the history ofLin...

Linux Kernel Development

Using Tracepoints to Debug iSCSI

Using Tracepoints to Debug iSCSI Modules Oracle Linux kernel developer Fred Herard offered this blog post on how to use tracepoints with iSCSI kernel modules. The scsi_transport_iscsi, libiscsi, libiscsi_tcp, and iscsi_tcp modules have been modified to leverage Linux Kernel Tracepoints to capture debug messages. Before this modification, debug messages for these modules were simply directed to syslog when enabled. This enhancement gives users the option to use Tracepoint facility to dump enabled events (debug messages) into ftrace ring buffer. The following tracepoint events are available: # perf list 'iscsi:*' List of pre-defined events (to be used in -e): iscsi:iscsi_dbg_conn [Tracepoint event] iscsi:iscsi_dbg_eh [Tracepoint event] iscsi:iscsi_dbg_session [Tracepoint event] iscsi:iscsi_dbg_sw_tcp [Tracepoint event] iscsi:iscsi_dbg_tcp [Tracepoint event] iscsi:iscsi_dbg_trans_conn [Tracepoint event] iscsi:iscsi_dbg_trans_session [Tracepoint event] Here's a simple diagram depicting the tracepoint enhancement: These tracepoint events can be enabled on the fly to aid in debugging iscsi issues. Here's a sample output of tracing iscsi:iscsi_dbg_eh tracepoint event using the perf utility: # /usr/bin/perf trace --no-syscalls --event="iscsi:iscsi_dbg_eh" 0.000 iscsi:iscsi_dbg_eh:session25: iscsi_eh_target_reset tgt Reset [sc ffff883fee609500 tgt iqn.1986-03.com.sun:02:fa41d51f-45a5-cea4-d661-a854dd13cf07]) 0.009 iscsi:iscsi_dbg_eh:session25: iscsi_exec_task_mgmt_fn tmf set timeout) 3.214 iscsi:iscsi_dbg_eh:session25: iscsi_eh_target_reset tgt iqn.1986-03.com.sun:02:fa41d51f-45a5-cea4-d661-a854dd13cf07 reset result = SUCCESS) Tracepoint events that have been insterted into ftrace ring buffer can be extracted using e.g. crash utility version 7.1.6 or higher: crash> extend ./extensions/trace.so ./extensions/trace.so: shared object loaded crash> trace show ... <...>-18646 [023] 20618.810958: iscsi_dbg_eh: session4: iscsi_eh_target_reset tgt Reset [sc ffff883fead741c0 tgt iqn.2019-10.com.example:storage] <...>-18646 [023] 20618.810968: iscsi_dbg_eh: session4: iscsi_exec_task_mgmt_fn tmf set timeout <...>-18570 [016] 20848.578257: iscsi_dbg_trans_session: session4: iscsi_session_event Completed handling event 105 rc 0 <...>-18570 [016] 20848.578260: iscsi_dbg_trans_session: session4: __iscsi_unbind_session Completed target removal This enhancement can be found in Oracle Linux UEK-qu7 and newer releases.

Using Tracepoints to Debug iSCSI Modules Oracle Linux kernel developer Fred Herard offered this blog post on how to use tracepoints with iSCSI kernel modules. The scsi_transport_iscsi, libiscsi,...