hysn-firecracker-python 1.0.6__tar.gz → 1.0.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. {hysn_firecracker_python-1.0.6/hysn_firecracker_python.egg-info → hysn_firecracker_python-1.0.7}/PKG-INFO +2 -2
  2. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/debian/control +1 -1
  3. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/debian/copyright +2 -2
  4. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/examples/Dockerfile +1 -1
  5. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/firecracker/_version.py +3 -3
  6. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/firecracker/microvm.py +34 -2
  7. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7/hysn_firecracker_python.egg-info}/PKG-INFO +2 -2
  8. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/pyproject.toml +1 -1
  9. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/setup.py +1 -1
  10. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  11. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  12. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/.github/workflows/pypi-release.yml +0 -0
  13. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/.gitignore +0 -0
  14. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/AGENTS.md +0 -0
  15. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/Dockerfile.test +0 -0
  16. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/FIRECRACKER_SETUP.md +0 -0
  17. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/LICENSE +0 -0
  18. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/Makefile +0 -0
  19. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/QUICKSTART.md +0 -0
  20. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/README.md +0 -0
  21. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/TODO.md +0 -0
  22. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/assets/img/firecracker.png +0 -0
  23. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/assets/rootfs/setup-firecracker-official.sh +0 -0
  24. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/cleanup_firecracker.py +0 -0
  25. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/debian/compat +0 -0
  26. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/debian/rules +0 -0
  27. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/docker-compose.test.yml +0 -0
  28. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/docs/README.md +0 -0
  29. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/docs/api-reference.md +0 -0
  30. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/docs/cleanup.md +0 -0
  31. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/docs/configuration.md +0 -0
  32. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/docs/examples.md +0 -0
  33. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/docs/getting-started.md +0 -0
  34. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/docs/index.md +0 -0
  35. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/docs/network.md +0 -0
  36. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/docs/testing-in-docker.md +0 -0
  37. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/examples/configure_vm_network.py +0 -0
  38. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/examples/create_vm.py +0 -0
  39. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/examples/create_vm_with_filesystem_format.py +0 -0
  40. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/examples/id_rsa +0 -0
  41. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/examples/id_rsa.pub +0 -0
  42. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/examples/init +0 -0
  43. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/examples/load_snapshot.py +0 -0
  44. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/examples/sample.py +0 -0
  45. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/examples/setup.sh +0 -0
  46. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/firecracker/__init__.py +0 -0
  47. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/firecracker/api.py +0 -0
  48. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/firecracker/config.py +0 -0
  49. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/firecracker/exceptions.py +0 -0
  50. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/firecracker/logger.py +0 -0
  51. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/firecracker/network.py +0 -0
  52. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/firecracker/process.py +0 -0
  53. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/firecracker/scripts.py +0 -0
  54. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/firecracker/utils.py +0 -0
  55. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/firecracker/vmm.py +0 -0
  56. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/hysn_firecracker_python.egg-info/SOURCES.txt +0 -0
  57. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/hysn_firecracker_python.egg-info/dependency_links.txt +0 -0
  58. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/hysn_firecracker_python.egg-info/entry_points.txt +0 -0
  59. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/hysn_firecracker_python.egg-info/requires.txt +0 -0
  60. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/hysn_firecracker_python.egg-info/top_level.txt +0 -0
  61. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/requirements.txt +0 -0
  62. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/scripts/cleanup_resources.py +0 -0
  63. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/scripts/run-tests-docker.sh +0 -0
  64. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/setup.cfg +0 -0
  65. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/README.md +0 -0
  66. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/conftest.py +0 -0
  67. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_api_client.py +0 -0
  68. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_cleanup.py +0 -0
  69. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_docker_integration.py +0 -0
  70. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_error_handling.py +0 -0
  71. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_logger.py +0 -0
  72. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_microvm.py +0 -0
  73. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_microvm_error_paths.py +0 -0
  74. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_microvm_initialization.py +0 -0
  75. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_network_error_paths.py +0 -0
  76. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_networking.py +0 -0
  77. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_port_forward.py +0 -0
  78. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_process_manager.py +0 -0
  79. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_rootfs_format.py +0 -0
  80. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_scripts.py +0 -0
  81. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_snapshots.py +0 -0
  82. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_utils.py +0 -0
  83. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_vm_configuration.py +0 -0
  84. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/tests/test_vmm_manager.py +0 -0
  85. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/uv.lock +0 -0
  86. {hysn_firecracker_python-1.0.6 → hysn_firecracker_python-1.0.7}/verify-setup.py +0 -0
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hysn-firecracker-python
3
- Version: 1.0.6
3
+ Version: 1.0.7
4
4
  Summary: A Python client library to interact with Firecracker microVMs
5
- Author: Muhammad Yuga Nugraha
5
+ Author: PDSO Platform
6
6
  License: MIT License
7
7
 
8
8
  Copyright (c) 2024 Practical DevSecOps
@@ -1,7 +1,7 @@
1
1
  Source: firecracker-python
2
2
  Section: python
3
3
  Priority: optional
4
- Maintainer: Muhammad Yuga Nugraha <myugan59@gmail.com>
4
+ Maintainer: PDSO Platform
5
5
  Standards-Version: 4.6.2
6
6
  Build-Depends: debhelper (>= 11), dh-python, python3-all, python3-setuptools, curl, jq
7
7
 
@@ -1,10 +1,10 @@
1
1
  Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2
2
  Upstream-Name: firecracker-python
3
- Upstream-Contact: Muhammad Yuga Nugraha <myugan59@gmail.com>
3
+ Upstream-Contact: PDSO Platform
4
4
  Source: https://github.com/myugan/firecracker-python
5
5
 
6
6
  Files: *
7
- Copyright: 2025 Muhammad Yuga Nugraha <myugan59@gmail.com>
7
+ Copyright: 2025 PDSO Platform
8
8
  License: MIT
9
9
 
10
10
  License: MIT
@@ -1,5 +1,5 @@
1
1
  FROM ubuntu:24.04
2
- LABEL maintainer="Muhammad Yuga Nugraha"
2
+ LABEL maintainer="PDSO Platform"
3
3
 
4
4
  COPY id_rsa.pub /root/.ssh/authorized_keys
5
5
  COPY init /usr/local/bin/init
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '1.0.6'
22
- __version_tuple__ = version_tuple = (1, 0, 6)
21
+ __version__ = version = '1.0.7'
22
+ __version_tuple__ = version_tuple = (1, 0, 7)
23
23
 
24
- __commit_id__ = commit_id = 'g3b21589ba'
24
+ __commit_id__ = commit_id = 'g3fc03cf51'
@@ -1541,6 +1541,8 @@ class MicroVM:
1541
1541
  container_name = image.split("/")[-1].replace(":", "-")
1542
1542
  tar_file = f"{self._config.data_path}/rootfs_{container_name}.tar"
1543
1543
 
1544
+ container = None
1545
+ merged_dir = None
1544
1546
  try:
1545
1547
  if not image:
1546
1548
  raise VMMError(f"Failed to download Docker image {image}")
@@ -1549,6 +1551,21 @@ class MicroVM:
1549
1551
  self._logger.debug(f"Creating container: {container_name}")
1550
1552
 
1551
1553
  container = self._docker.containers.create(image, name=container_name)
1554
+
1555
+ # container.export() makes the daemon mount the container's overlay
1556
+ # rootfs (overlay2/<id>/merged), and container.remove() does not
1557
+ # unmount it. The orphaned mount pins the image layers, so a later
1558
+ # `docker image prune` reclaims 0B and disk fills up over repeated
1559
+ # builds. Capture the merged path now (populated at create time) so
1560
+ # we can unmount it explicitly in the finally block below.
1561
+ try:
1562
+ graph = self._docker.api.inspect_container(
1563
+ container.id
1564
+ ).get("GraphDriver", {})
1565
+ merged_dir = graph.get("Data", {}).get("MergedDir")
1566
+ except Exception:
1567
+ merged_dir = None
1568
+
1552
1569
  export_data = container.export()
1553
1570
 
1554
1571
  if self._config.verbose:
@@ -1558,8 +1575,6 @@ class MicroVM:
1558
1575
  for chunk in export_data:
1559
1576
  f.write(chunk)
1560
1577
 
1561
- container.remove(force=True)
1562
-
1563
1578
  if self._config.verbose:
1564
1579
  self._logger.debug(f"Successfully exported container to {tar_file}")
1565
1580
 
@@ -1569,6 +1584,23 @@ class MicroVM:
1569
1584
  raise VMMError(f"Docker error: {e}")
1570
1585
  except Exception as e:
1571
1586
  raise VMMError(f"Unexpected error: {e}")
1587
+ finally:
1588
+ # Remove the container, then ensure its overlay rootfs is unmounted
1589
+ # so the image layers can actually be pruned/reclaimed afterwards.
1590
+ if container is not None:
1591
+ try:
1592
+ container.remove(force=True)
1593
+ except Exception as e:
1594
+ if self._config.verbose:
1595
+ self._logger.debug(
1596
+ f"Failed to remove container {container_name}: {e}"
1597
+ )
1598
+ if merged_dir and os.path.ismount(merged_dir):
1599
+ # Plain unmount first; lazy unmount if briefly busy after teardown.
1600
+ if run(f"umount {merged_dir}").returncode != 0:
1601
+ run(f"umount -l {merged_dir}")
1602
+ if self._config.verbose:
1603
+ self._logger.debug(f"Unmounted leaked overlay: {merged_dir}")
1572
1604
 
1573
1605
  def _build_rootfs(self, image: str, file: str, size: str, fs_format: str = "ext4"):
1574
1606
  """Create a filesystem image from a tar file.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hysn-firecracker-python
3
- Version: 1.0.6
3
+ Version: 1.0.7
4
4
  Summary: A Python client library to interact with Firecracker microVMs
5
- Author: Muhammad Yuga Nugraha
5
+ Author: PDSO Platform
6
6
  License: MIT License
7
7
 
8
8
  Copyright (c) 2024 Practical DevSecOps
@@ -7,7 +7,7 @@ name = "hysn-firecracker-python"
7
7
  dynamic = ["version"]
8
8
  description = "A Python client library to interact with Firecracker microVMs"
9
9
  authors = [
10
- {name = "Muhammad Yuga Nugraha"}
10
+ {name = "PDSO Platform"}
11
11
  ]
12
12
  requires-python = ">=3.9"
13
13
  dependencies = [
@@ -4,7 +4,7 @@ from setuptools import setup
4
4
  setup(
5
5
  name="hysn-firecracker-python",
6
6
  description="A Python client library to interact with Firecracker microVMs",
7
- author="Muhammad Yuga Nugraha",
7
+ author="PDSO Platform",
8
8
  packages=find_packages(),
9
9
  install_requires=[
10
10
  "requests==2.32.3",