Container Test Data Persistence via Host Directory Mounting

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Container crashes during application updates or new feature implementation in cloud-based microservices can lead to instability and downtime, as test data is often lost, making it difficult for developers to diagnose and fix issues.

Innovation Solution

A two-part test framework comprising a test manager and a test controller that creates a test container image with artifacts and dependencies, distributes tests via a directory mount, and monitors test execution, preserving results on the host filesystem even if the container crashes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If tests are run inside containers during application updates, then application stability can be verified, but test data is lost when containers crash, making it difficult to diagnose issues

Engineering Contradiction:
Improveapplication stabilityVSAvoidtest data
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The patent introduces a host filesystem as an intermediary storage layer between the container and test data. Test data is written to the host filesystem rather than being stored exclusively within the container, allowing persistence even when the container crashes. This mediator preserves test information while maintaining the containerized testing approach.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent moves test data storage from the container's ephemeral filesystem to the host's persistent filesystem, effectively changing the storage dimension from temporary to permanent. This dimensional shift allows test data to survive container lifecycle events while maintaining access during testing.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Productivity

If containers are used for application deployment, then resource isolation and management are improved, but container crashes cause downtime and require manual intervention

Engineering Contradiction:
Improveresource management efficiencyVSAvoiddowntime
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent implements preliminary action by pre-configuring the container with mounted host directories before tests execute. This ensures that test data persistence infrastructure is already in place, eliminating the need for manual intervention after crashes and enabling immediate retry of failed tests without setup overhead.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If test data is stored inside containers, then testing can be performed in isolated environments, but data persistence across container restarts cannot be achieved

Engineering Contradiction:
Improvetesting isolationVSAvoiddata persistence
Core Design Contradiction:
Adaptability or versatilityVSDuration of action of stationary object

Solution Approach 1:

The patent merges the isolated container environment with the persistent host filesystem by mounting host directories into the container. This combination maintains the benefits of isolated testing while adding data persistence capability, allowing test data to survive container restarts without breaking isolation boundaries.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS11288178B2Container testing using a directory and test artifacts and/or test dependencies
Publication Date: 2022.03.29 RED HAT INC
  • US11288178B2 patent drawing
  • US11288178B2 patent drawing
  • US11288178B2 patent drawing

AI summary

A system for testing container applications includes a memory, a processor in communication with the memory, a test manager, and a test controller. The test manager runs on a host operating system and creates a test container image including test artifact(s) and/or test dependency(ies). Then, the test manager distributes a set of tests, which are accessible to a test container created from the test container image. The test manager distributes the tests by populating a directory with the set of tests and mounting the directory to the test container. Additionally, the test manager executes the test container image. The test controller is associated with the test container and executes the set of tests accessible to the test container using the test artifact(s) and/or the test dependency(ies). The test controller also monitors the set of tests executed by the test container. Feedback corresponding to the set of tests is provided.