How Do You Get a Lost Clothes Item in a GE Washer?

Problem scenario
You have a stackable GE washer. The cylindrical basin of the washing machine allows for clothes items to disappear into the cubic chasis/frame of the washing machine. You are missing a washcloth, a sock or a glove. (You may or may not have seen it fall over the cylindrical tub basin into the square body of the washer when taking out the clean clothes. Sometimes an item just spins into the crevice between the agitator basin and the external body of the washer.) You want to get this small clothes item from your washing machine. How do you do this?

Solution
Prerequisite: You will need a flat head screw driver. A butter knife may work however.

Procedures
Open the front side by sticking a flat head screwdriver into the small, inconspicuous depression area under the top portion of the washer. Push it in 1.5 to 2 inches. You should be able to find a groove and the top (of the front metal side of the washing machine) will start to open outwardly closer to you while the bottom of the front metal side will stay in its place. You do this one-side at a time. One person can do it. Try to not scratch the paint.

Can a Container Layer Be Written to?

Question
Are container layers immutable or can one be written to?

Answers
Maybe they can be written to. It depends how you define a layer.

Here are quotes and sources that say you cannot write to a layer:

The layers of a container image are all immutable. Immutable means that once generated, the layer cannot ever be changed.

https://medium.com/@goyalsaurabh66/docker-images-838383b367

One of the principles of Docker containers is that an image is immutable -- once built, it’s unchangeable, and if you want to make changes, you’ll get a new image as a result.

https://www.cloudbees.com/blog/container-image-immutability-power-metadata

Immutable containers are containers that have no state. … Immutability improves security by decreasing the damage that can be done by a local compromise. Immutable images themselves have no secrets and save no state that could get corrupted. Immutable containers are trivial to verify because they never change.

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/container_security_guide/keeping_containers_fresh_and_updateable

Here are quotes and sources that say you can write to a layer:

When you start a container, Docker takes all the layers on your image, and adds a new one on top of it – That’s the read-write layer, and the one containing all the changes you do to your filesystem: File changes, file additions, file deletions.

https://blogs.cisco.com/developer/container-image-layers-1

Docker uses storage drivers to store image layers, and to store data in the writable layer of a container. The container’s writable layer does not persist after the container is deleted, but is suitable for storing ephemeral data that is generated at runtime.

https://docs.docker.com/storage/storagedriver/

As we have discussed, a container image is made of a stack of immutable or read-only layers. When the Docker engine creates a container from such an image, it adds a writable container layer on top of this stack of immutable layers.

https://www.oreilly.com/library/view/learn-docker/9781788997027/9459555d-45ab-4046-a403-c12407665717.xhtml

This Stackoverflow.com posting refers to writable layers of Docker.

How Do You Correct a /etc/fstab File That is Read Only?

Problem scenario
You boot up and log in. You cannot write to /tmp/.

What should you do?

Solution
First, mentally identify the file system in the /etc/fstab file (e.g., /dev/desk/by-id/dm-uuid-LVM-abcd1234).

Here is an example of an /etc/fstab file to determine what the file system string you need is:

/dev/disk/by-id/dm-uuid-LVM-abcd1234 / ext4 defaults,quota,grpquota 0 0
# /boot was on /dev/sda2 during curtin installation
/dev/sdc /var ext4 defaults 1 2
/dev/sda /opt ext4 defaults 0 0
/dev/disk/by-uuid/987654321 /boot ext4 defaults 0 0

Procedure
Run a command like this (but replace /dev/desk/by-id/dm-uuid-LVM-abcd1234 with the file system you need):

sudo mount -o remount,rw /dev/desk/by-id/dm-uuid-LVM-abcd1234

Now you should be able to modify the /etc/fstab file.

We appreciate this external posting for assisting with developing this solution.

How Do You Troubleshoot the Python Problem “ValueError: time data … does not match %m”?

Problem scenario
You are trying to parse a log file with Python. The date entries use abbreviated spellings of months -- not integer month values. You get an error like this:

"ValueError: time data 'Jul 15 06:10:32' does not match format '%m %d %H:%M:%S'"

What should you do?

Solution
Replace the "%m" with "%b".

import datetime
log_reader = open('auth.log', 'r')
for line in log_reader:
    dt_of_log = datetime.datetime.strptime(line[:15], '%b %d %H:%M:%S')
    if line.startswith("Jul 15"):
        print(line)

How Do You Find out if a VIN Has a Letter “o” or the Numeral 0?

Question
How do you determine/identify a vehicle identification number having the letter "O" (as in "Oscar") or the numeral 0? The Arabic number 0 can be confused with the letter "O."

Answer
It is numeral 0. The letter "O" is not allowed according to
https://checkventory.com/articles/whats-your-number/
. Apparently letters "I" and "Q" are not allowed either (presumably due to their potential confusion with numerals "1" and "0").

We believe that ISO 3779:P2009 is the document that governs VIN characters.

Why Do yum/dnf Commands Fail with the –installroot Flag and How Do You Fix Them?

Problem scenario
dnf or yum commands always fail when you use the --installroot flag. The destination of the --installroot directory do not matter. You see error messages about epel, version, 404 and reaching external servers.

Solution
Root cause: There is an invocation of chroot behind the scenes (according to https://bugzilla.redhat.com/show_bug.cgi?id=850686).

Procedures
The --installroot=/foo/bar flag should always be used in conjunction with --releasever=X where "X" is the major version of your RedHat server. To find out what version you are using, run this: sudo cat /etc/*-release
For RedHat 9 here is an example of how to install "foobar" in /opt (instead of wherever foobar would have been installed):

sudo dnf -y install foobar --installroot=/opt --releasever=9

How Do You Install an rpm/yum/dnf Package in a Non-Stardard Location?

Problem scenario
A partition is filling up on CentOS/Stream/RHEL/Fedora Linux. You do not want to have a package be installed in /usr or some "normal" location. You want to uninstall a package and reinstall it elsewhere. But moving the directory won't work because the binary command will point to the old location. What should you do to get the destination of the installation to be something customized (and not the default directory)?

Solution
Use a yum or dnf command to install it with these two flags: --installroot=/destination/ --releasever=9

Replace "desination" with the directory you want it to be installed in (e.g., /opt/ or your own path). Replace "9" with the major RedHat version you are using. If you are unsure, run this: sudo cat /etc/*-release

This would install foobar in /opt if you were using RHEL version 9:
sudo dnf -y install foobar --installroot=/opt --releasever=9

This will create a full set of FHS directories. If you choose a location that has already been used as an --installroot, the …/repos.d/ file will be consulted for the location of the installation media. (Some people do not care for this functionality; see this posting https://bugzilla.redhat.com/show_bug.cgi?id=1708204 if you are interested.) You could move the relevant yum.repos.d directory to a yum.repos.d.bak directory. Then the normal yum/dnf/rpm repos will be used on the system. In newly created directories or any directory where the location has not already been the target of such the --installroot flag, there will be no problem. This does create many more files and takes up space.

You can see this for more information: https://linuxhint.com/install-package-to-a-specific-directory-using-yum/

How Do You Troubleshoot the Python Problem “TypeError: ‘module’ object is not callable”?

Problem scenario
You run a Python program with datetime, but you get the error "TypeError: 'module' object is not callable." What should you do?

Solution
Even though you may use "import datetime" at the top of the program, you should use "from datetime import datetime, timezone" at the top. If you used the syntax "datetime.datetime…", you will need to remove one of the "datetime." strings from the code. Such incorrect syntax will cause an error like "AttributeError: type object 'datetime.datetime' has no attribute 'datetime'" to be thrown.

Here is a program that will not throw any error (as long as you have a file named auth.log in the same directory):

import datetime
from datetime import datetime, timezone
log_reader = open('auth.log', 'r')
for line in log_reader:
    dt_of_log = datetime.strptime(line[:6], '%b %d')
    x = datetime(1900, 6, 15, 15, 17, 8, 132263).isoformat()
    print(x)

What Do the Terms Upstream and Downstream Mean in I.T.?

Question
What do the terms upstream and downstream mean in I.T.?

Answer
If a project B is downstream from project A, project B has evolved from project A. In the genealogy of software/code/projects, project A is said to be upstream to project B if project A is an ancestor of project B. Project D is said to be downstream to project C if project D is a descendant of project B.

For a detailed explanation, see https://reflectoring.io/upstream-downstream/