Click the location tag of this post for Kuala Lumpur, Malaysia. You will get to this place. And whats its is in that void space in between buildings?
GPS Coordinate
This is Harisfazillah Jamel or LinuxMalaysia blog for logs of my activities in the Internet and for the Linux and Open Source software support. This blog is a portal to numbers of links related to Harisfazillah Jamel. Ini adalah blog log tugasan dan aktiviti Haris di Internet dan sokongan Linux dan perisian sumber terbuka, untuk tujuan rujukan akan datang.
Click the location tag of this post for Kuala Lumpur, Malaysia. You will get to this place. And whats its is in that void space in between buildings?
GPS Coordinate
We are thrilled to announce the Mini UbuCon Malaysia 2025, an event dedicated to advancing the open-source software ecosystem in our region. This year, the Ubuntu Malaysia LoCo Team is proud to partner with Cyber Digital Services, Defence and Security Asia (CyberDSA), a leading regional event serving key stakeholders in the cyber defence and security industry.
Please save the date and venue for this event:
Event: Mini UbuCon Malaysia 2025
Dates: 30 September 2025
Venue: Kompleks MITEC KL Metropolis, 8, Jalan Dutamas 2, Segambut, 50480 Kuala Lumpur
For more information and registration, please visit:
Mini UbuCon Malaysia 2025: https://2025.ubuntu.my/
CyberDSA: https://www.cyberdsa.com/
Through this collaboration, CyberDSA is the Official Place Sponsor for Mini UbuCon Malaysia 2025. This sponsorship has made it possible for us to select Kompleks MITEC KL Metropolis as our official venue, a premier convention center that will provide an exceptional setting for our community to connect, learn, and network.
As one of the world's most popular Linux distributions, Ubuntu is a cornerstone of the open-source movement. Dive deep into the latest advancements that Ubuntu and the broader Linux ecosystem have to offer. Whether you are a seasoned professional or a beginner, this conference provides invaluable insights into the evolving landscape of Linux and its powerful applications in cybersecurity.
Meet and connect with like-minded individuals, industry experts, and key contributors to the Ubuntu community. This is a unique opportunity to expand your network and collaborate with others who share your passion for open-source technology.
The local Ubuntu Malaysia Community plays a crucial role in the ongoing development and support of this versatile operating system. Your participation helps bolster this community and ensures the continuous growth and innovation of Ubuntu, which in turn strengthens the global Linux community as a whole.
CyberDSA aspires to be a catalyst for change, connecting decision-makers in government and private sectors to accelerate the cyber defence and security agenda. This event aims to impart the latest knowledge and intriguing insights about cybersecurity while showcasing cutting-edge technologies that would safeguard digital economies and foster global competitiveness.
We are confident that this conference will be a significant step forward for the Malaysian open-source community. We look forward to seeing you there.
Sincerely,
Harisfazillah Jamel (LinuxMalaysia)
Ubuntu Malaysia LoCo Team
🚀 Mini UbuCon Malaysia 2025: Share Your Voice, Shape the Future! 🐧
We’re thrilled to announce that planning for Mini UbuCon Malaysia 2025 is officially in motion! As Ubuntu and open source communities continue to grow, this event aims to bring together passionate developers, technologists, and enthusiasts from across Malaysia.
🔗 Fill in our Community Survey
Have a say in shaping the agenda, format, and topics for Mini UbuCon 2025:
👉 https://form.ubuntu.my/2025/ubucon/
💡 Why Your Input Matters
Mini UbuCon is built by the community, for the community. Whether you’re
excited to attend, want to propose a talk, or simply have ideas on what
we should cover — we want to hear from you:
🎤 Suggest exciting talk topics
🧠 Let us know what you want to learn or discuss
📍 Help us create an event that reflects YOUR interests
🗓 Tentative Date: Mini UbuCon October 2025 / Malaysia For UbuCon 2026
📣 Join Our Conversation on Telegram
Stay updated and chat with fellow Ubuntu MY members:
🔗 https://t.me/ubuntumalaysia
Mini UbuCon is a community-powered event celebrating Ubuntu and the broader open source movement. Expect insightful talks, hands-on workshops, technical demos, and open forums. It’s a space to network, collaborate, and grow together — whether you’re a Linux beginner or a seasoned sysadmin.
Ubuntu Linux, developed by Canonical, is one of the world’s most popular open source operating systems. It powers desktops, servers, and cloud infrastructures globally — thanks to its stability, security, and passionate community. Ubuntu makes technology accessible, empowering innovation from classrooms to enterprises.
Ubuntu is at the forefront of AI and machine learning. With native support for leading frameworks like TensorFlow and PyTorch, along with robust GPU compatibility, it’s the go-to platform for AI development — from cloud clusters to edge devices. Mini UbuCon 2025 will spotlight these innovations, including practical AI use cases and community-driven projects.
📄 Additional Resources & Event References
💬 Let’s Build It Together!
The future of open source in Malaysia depends on your voice, your
curiosity, and your participation. Help shape Mini UbuCon 2025 by
joining the conversation and completing our quick survey:
👉 https://form.ubuntu.my/2025/ubucon/
#MiniUbuCon2025 #UbuntuMY #OpenSourceMY #LinuxMalaysia #UbuCon
2. ETCD Cluster Node Information 2
4. Upgrade Process Steps (Rolling Upgrade Node by Node) 3
4.1. Remove Previous Version of Percona pg_tde (If Applicable) 3
4.2. Update Percona Release Package 4
4.3. Install Required Dependencies and Enable Repositories 4
4.4. Configure Percona Distribution for PostgreSQL 17 Repository 5
4.5. Stop Patroni Service on the Current Node 6
4.6. Install/Upgrade Percona Distribution for PostgreSQL 17 Packages 6
4.7. Start Patroni Service on the Current Node 7
4.9. Repeat Steps for Other Replicas 7
4.10. Perform Patroni Switchover (Before upgrading the original primary) 8
4.11. Upgrade the Original Primary Node (Now a Replica) 8
4.12. Configure pg_tde in PostgreSQL Configuration (If not already done) 9
4.13. Perform Patroni Cluster-Wide Restart to Apply Configuration Changes 9
4.14. Optional: Perform a Patroni Switchover for Verification 10
5. Performance Tuning Considerations 11
6. Post-Upgrade Verification 14
7. Handling Potential Issues 14
8. Understanding patronictl list Output 15
This comprehensive guide details the procedures for managing and performing a minor version upgrade of a Percona Distribution for PostgreSQL cluster, which is orchestrated by Patroni and relies on etcd for distributed consensus. This document also includes an explanation of key diagnostic outputs for cluster monitoring. All sensitive information, such as specific IP addresses, hostnames, usernames, and cluster names, has been anonymised to protect privacy for public reference.
Important Note: This document outlines steps specifically for a minor version upgrade within the PostgreSQL 17 series (e.g., from 17.2 to 17.4). Major version upgrades (e.g., from PostgreSQL 16 to 17) typically involve different procedures, often utilising pg_upgrade or logical replication, which are not covered here.
The following nodes comprise the Percona Distribution for PostgreSQL cluster managed by Patroni:
Node Name | IP Address | Role |
pg-node-1 | 192.168.1.101 | Leader |
pg-node-2 | 192.168.1.102 | Replica |
pg-node-3 | 192.168.1.103 | Replica |
Note: The roles (Leader/Replica) are dynamic and managed by Patroni based on cluster state and health.
The Patroni instances in this PostgreSQL cluster rely on a 5-node etcd cluster for distributed consensus, leader election, and state storage. The etcd cluster nodes are:
IP Address | Hostname | Short Name |
192.168.1.201 | etcd-node-1 | etcd-node-1 |
192.168.1.101 | pg-node-1 | pg-node-1 |
192.168.1.102 | pg-node-2 | pg-node-2 |
192.168.1.103 | pg-node-3 | pg-node-3 |
192.168.1.202 | etcd-node-2 | etcd-node-2 |
Note:
Some nodes may serve multiple roles (e.g., hosting both PostgreSQL and
etcd members) for resource efficiency or specific architectural designs.
Before commencing any upgrade or significant maintenance, ensure the following critical prerequisites are met:
Perform
the following steps on each node in the cluster, adhering to a rolling
upgrade approach. It is crucial to start with replica nodes and only
upgrade the primary after a controlled switchover, to minimise service
disruption.
dnf remove percona-pg_tde_16 |
dnf update percona-release |
dnf install dnf-plugins-core -y |
dnf install epel-release -y |
dnf install dnf-plugins-core -y |
dnf -y install curl |
percona-release setup ppg17 |
systemctl stop patroni |
dnf install percona-ppg-server17 |
[root@pg-node-3 ~]# dnf install percona-ppg-server17 |
systemctl start patroni |
patronictl -c /etc/patroni/postgresql.yml list |
Repeat steps 4.5 through 4.8 on each remaining replica node in the cluster, one node at a time.
### Perform a switchover to make an upgraded replica the new primary
patronictl -c /etc/patroni/postgresql.yml switchover --candidate <name_of_an_upgraded_replica> my-pg-cluster |
# Identify the original primary node (which is now a replica after switchover) |
# Connect to the CURRENT primary node (the one promoted in step 4.10) |
patronictl -c /etc/patroni/postgresql.yml restart my-pg-cluster |
Restart if the PostgreSQL version is less than provided (e.g. 9.5.2) []: |
[root@pg-node-1 ~]# patronictl -c /etc/patroni/postgresql.yml list |
### just incase primary/leader change to other node
patronictl -c /etc/patroni/postgresql.yml switchover --leader pg-node-3 --candidate pg-node-1 my-pg-cluster |
patronictl -c /etc/patroni/postgresql.yml list |
PostgreSQL performance tuning is a critical aspect of database administration, ensuring the system efficiently handles its workload. Many parameters, especially those that allocate memory or manage background processes, require a PostgreSQL instance restart to take effect. The "Pending restart reason" in patronictl list often highlights changes to such parameters.
Here's an explanation of common performance-related parameters and their tuning considerations:
General Tuning Principles:
After completing the package upgrades and cluster restart on all nodes, perform the following comprehensive verification steps:
Here's an explanation of the patronictl list command output, which provides a summary of your Patroni-managed PostgreSQL cluster:
[admin_user@pg-node-a ~]$ sudo patronictl -c /etc/patroni/postgresql.yml list |
Explanation of the Output:
In summary, this output indicates that your PostgreSQL cluster has several pending configuration changes across all its nodes that require a restart of each PostgreSQL instance for them to be fully applied and become active. Patroni is aware of these pending restarts and is ready to manage them.
To apply these changes and ensure your cluster is running with the updated configuration, you would typically perform a controlled rolling restart of the cluster using Patroni's command-line interface, for example:
patronictl -c /etc/patroni/postgresql.yml restart my-pg-cluster
This command would instruct Patroni to orchestrate the restarts of your PostgreSQL instances in a safe manner, typically restarting replicas first and then the primary, to minimise service disruption.
This comprehensive guide serves as a reference for performing minor version upgrades and understanding key diagnostic outputs for a Percona Distribution for PostgreSQL cluster managed by Patroni and etcd. By following these detailed steps and best practices, administrators can ensure a smooth upgrade process and maintain the high availability and performance of their PostgreSQL environment. Regular verification and adherence to security best practices are essential for a robust and secure database infrastructure.
Prepared By : Harisfazillah Jamel and Google Gemini, LinuxMalaysia. 26 Jul 2025.
This guide outlines a robust process for deploying Java 21 OpenJDK in environments with no internet connectivity (air-gapped systems). It leverages the yumdownloader utility to efficiently gather all necessary RPM packages and their dependencies from an internet-connected host, enabling a secure and controlled installation on the isolated target system.
To successfully follow this guide, ensure you have the following:
Internet-Connected Host:
A Linux machine with active internet access.
Crucially, this host should be running the same major and minor version of AlmaLinux, Red Hat Enterprise Linux (RHEL), or a compatible distribution as your air-gapped target. This ensures package compatibility and avoids unforeseen dependency issues.
An active RHEL subscription (if using RHEL) to access official repositories.
Alternative: RHEL 9 on Windows 11 WSL2
For users who prefer a Windows environment, you can set up a Red Hat Enterprise Linux 9 instance within Windows Subsystem for Linux 2 (WSL2) to serve as your internet-connected host. This provides a convenient way to access RHEL repositories and download packages. Remember to obtain the RHEL 9 image from the official Red Hat Developer program.
Air-Gapped Host:
The target Linux machine where Java 21 OpenJDK will be installed. This host must have absolutely no direct internet access.
Secure Transfer Mechanism:
A reliable and secure method to transfer files from the internet-connected host to the air-gapped host. Common methods include:
USB drive (ensure it's clean and secure)
Portable hard drive
Intermediate jump host with strict access controls
Secure local network share (if applicable and isolated)
On your internet-connected AlmaLinux 9 (or equivalent RHEL/CentOS) host, we will use yumdownloader to collect all required RPMs.
Install yum-utils Package:
The yumdownloader utility is part of the yum-utils package. If it's not already installed, proceed with the installation.
sudo dnf install yum-utils |
You will be prompted to confirm the installation. Type y and press Enter.
Verify OpenJDK 21 Package Name:
Before downloading, it's a good practice to confirm the exact package name for Java 21 OpenJDK available in your repositories.
dnf search openjdk |
Look for the java-21-openjdk.x86_64 entry, which represents the primary runtime environment package.
Create a Dedicated Download Directory:
Establish a clean, dedicated directory to store all the downloaded RPM packages. This organization is vital for managing the numerous dependency files.
mkdir ~/openjdk-rpm-download |
Download Java 21 OpenJDK and its Dependencies:
This is the core step. Use yumdownloader with the --resolve option to automatically identify and download all recursive dependencies of java-21-openjdk. The --downloaddir option directs where these RPMs will be saved.
yumdownloader java-21-openjdk --downloaddir ~/openjdk-rpm-download --resolve |
java-21-openjdk: Specifies the primary package for which dependencies are to be resolved.
--downloaddir ~/openjdk-rpm-download: Sets the target directory for all downloaded RPM files.
--resolve: Crucial for air-gapped environments, this option ensures that yumdownloader fetches not only the specified package but also all its direct and indirect dependencies. This guarantees a self-contained set of RPMs for offline installation.
The download process may take some time, as OpenJDK has a significant number of dependencies (as observed in your previous output, around 130 packages).
Verify Downloaded Files:
Once the download operation completes, list the contents of your designated download directory to confirm that all expected RPM files are present.
ls ~/openjdk-rpm-download
You should see a comprehensive list of .rpm files, including java-21-openjdk-*.rpm and java-21-openjdk-headless-*.rpm, alongside all their required libraries and components.
Securely move the entire ~/openjdk-rpm-download directory (containing all the collected RPM files) from your internet-connected host to a suitable location on the air-gapped target host.
Example using a USB Drive:
Copy to USB Drive (on Internet Host):
cp -r ~/openjdk-rpm-download /mnt/usb_drive/ # Adjust /mnt/usb_drive/ as per your system
Safely Unmount USB Drive (on Internet Host).
Connect USB Drive (to Air-Gapped Host).
Copy from USB Drive (on Air-Gapped Host):
cp -r /mnt/usb_drive/openjdk-rpm-download /opt/rpms/ # Adjust paths as needed
For those who wish to understand the dependency chain explicitly or debug specific issues, you can attempt to install packages one by one. This method is generally not recommended for production environments due to its tedious nature and potential for errors, but it is highly valuable for learning and precise dependency mapping.
Navigate to the RPM Directory:
cd /path/to/openjdk-rpm-download # Replace with the actual path where you transferred the RPMs |
Attempt to Install the Main Package First:
Start by trying to install the primary java-21-openjdk package. This will reveal its immediate missing dependencies.
sudo rpm -Uvh java-21-openjdk-21.0.8.0.9-1.el9.alma.1.x86_64.rpm |
You will likely see an error: Failed dependencies: output, similar to your original notes, listing all the immediate prerequisites. For example:
error: Failed dependencies:
fontconfig(x86-64) is needed by java-21-openjdk-1:21.0.8.0.9-1.el9.alma.1.x86_64
java-21-openjdk-headless(x86-64) = 1:21.0.8.0.9-1.el9.alma.1 is needed by java-21-openjdk-1:21.0.8.0.9-1.el9.alma.1.x86_64
libX11.so.6()(64bit) is needed by java-21-openjdk-1:21.0.8.0.9-1.el9.alma.1.x86_64
... (many more dependencies)
Install Listed Dependencies Iteratively:
Go through the list of failed dependencies and install them one by one. After installing a set of dependencies, try installing the main package again. Repeat this process until all dependencies are satisfied.
Example Iteration:
# Install fontconfig
sudo rpm -Uvh fontconfig-*.rpm
# Install java-21-openjdk-headless (often a major dependency)
sudo rpm -Uvh java-21-openjdk-headless-*.rpm
# Install X11 libraries
sudo rpm -Uvh libX11-*.rpm libXcomposite-*.rpm libXext-*.rpm libXi-*.rpm libXrender-*.rpm libXtst-*.rpm xorg-x11-fonts-Type1-*.rpm
Note: You'll need to identify the exact RPM filenames from your ls ~/openjdk-rpm-download output. Using wildcards (*.rpm) can simplify this if only one version of each dependency is present.
Continue until Main Package Installs:
Keep repeating step 2, installing the newly reported missing dependencies, until sudo rpm -Uvh java-21-openjdk-*.rpm executes successfully without dependency errors.
This manual process provides deep insight into the package's dependencies but is significantly more time-consuming than the recommended sudo rpm -Uvh *.rpm approach, which leverages rpm's internal dependency resolver to handle the order automatically when all files are present.
To install all at once (you are confidence the dependencies don't break others packages), run the rpm -Uvh *.rpm command on the target systems. Prefer to install rpm one by one.
On your air-gapped host, navigate to the directory where you've placed the RPMs and proceed with the installation.
Install All Downloaded RPMs:
Since yumdownloader with --resolve has ensured that all dependencies are available locally, you can perform a single, comprehensive installation of all RPMs in the directory. The rpm -Uvh command will install new packages or upgrade existing ones, providing verbose output (-v) and a progress bar (-h).
sudo rpm -Uvh *.rpm
Note on Dependencies: Unlike your initial attempt to install only java-21-openjdk.rpm which failed due to missing dependencies, installing *.rpm in the directory ensures that rpm can find and satisfy all dependencies from the local set of files. This is the correct and most efficient method for air-gapped installations.
Verify Installation:
After the installation process completes, confirm that Java 21 OpenJDK has been successfully installed and is accessible on your air-gapped system.
java -version
You should observe output similar to the following, confirming the installed Java version:
openjdk version "21.0.8" 2025-07-16
OpenJDK Runtime Environment (build 21.0.8+9-LTS)
OpenJDK 64-Bit Server VM (build 21.0.8+9-LTS, mixed mode, sharing)
Version Consistency: Reiterate the critical importance of ensuring the exact same major and minor Linux distribution version (e.g., AlmaLinux 9.x, RHEL 9.x) on both the internet-connected and air-gapped hosts. Even slight version mismatches can lead to library conflicts or unexpected behavior.
Automation with Ansible: For managing multiple air-gapped systems or automating routine updates, leveraging Ansible is highly recommended. Playbooks can be crafted to:
Execute yumdownloader on a designated "bastion" host with internet access.
Securely transfer the collected RPMs to a local repository or directly to target air-gapped servers (adhering to strict security protocols for data transfer).
Run the rpm -Uvh *.rpm command on the target systems.
Local Repository Management: For larger-scale air-gapped deployments, consider setting up a local YUM/DNF repository. This involves using tools like reposync to mirror external repositories and createrepo to generate metadata, providing a more robust and scalable solution for managing packages offline. While yumdownloader is excellent for individual package sets, a local repository offers greater flexibility for ongoing maintenance.
This section compiles all the external resources and documentation referenced in our discussion, providing avenues for deeper understanding and official guidance.
Red Hat Access: How to download an installed package, "yumdownloader" is useful.
URL: https://access.redhat.com/solutions/10154
Description: An official Red Hat solution article detailing the basic usage of yumdownloader for downloading RPM packages. This also covers using yumdownloader for installed packages.
Red Hat Access: How to use yum to download a package without installing it
URL: https://access.redhat.com/solutions/9934
Description: Another official Red Hat solution covering two methods for downloading packages without installation: the downloadonly plugin and yumdownloader. This was a key reference for understanding the --downloadonly option and --downloaddir option.
AlmaLinux Git: rpms/java-21-openjdk
URL: https://git.almalinux.org/rpms/java-21-openjdk
Description: The Git repository for the java-21-openjdk RPM in AlmaLinux. It provides insights into how OpenJDK packages are built and maintained, noting the shift to a single portable build for different RHEL major versions. This is useful for inspecting package specifics, build information, and dependencies at a deeper level.
Red Hat Developer Program: Download RHEL
URL: https://developers.redhat.com/products/rhel/download
Description: The official portal for developers to download Red Hat Enterprise Linux, crucial for obtaining compatible RHEL versions for your internet-connected host.
Red Hat Developer Program: Getting Started with RHEL on Windows Subsystem for Linux (WSL2)
URL: https://developers.redhat.com/articles/2025/05/20/getting-started-rhel-windows-subsystem-linux
Description: A comprehensive guide for setting up Red Hat Enterprise Linux (RHEL) within Windows Subsystem for Linux 2 (WSL2) on Windows 11. This enables developers and system administrators to run RHEL locally on Windows, facilitating the preparation of RPMs in a familiar environment.
Red Hat Customer Portal: Red Hat Enterprise Linux 9 Downloads (for WSL2)
URL: https://access.redhat.com/downloads/content/479/ver=/rhel---9/9.6/x86_64/product-software
Description: Direct download links for RHEL 9.x releases, specifically relevant for obtaining the necessary image to set up RHEL 9 within WSL2. This is essential for ensuring version parity between your source and target systems.
Prepared by Harisfazillah Jamel with the help of Google Gemini, LinuxMalaysia 26 Jul 2025.
Yumdownloader - RPM download |