Skip to content

Conversation

@rezib
Copy link
Collaborator

@rezib rezib commented Jan 26, 2026

When starting VM with a remote image and local copy is present, try to send HEAD request on remote URL to get its Last-Modified header for comparison with local copy mtime on filesystem (converted in UTC timezone). If mtime is older than remote URL Last-Modified, remove local copy and download latest VM image.

@rezib rezib force-pushed the pr/vm-download-check branch from f2867ca to 8f372c2 Compare January 26, 2026 10:18
@rezib
Copy link
Collaborator Author

rezib commented Jan 26, 2026

There is an unrelated failing unit test but it is fixed by f979275 in #45.

@rezib rezib requested review from qa-cea and valeriyoann January 26, 2026 12:10

def last_modified(url):
"""
Return number of seconds since epoch of Last-Modified header for the given
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest: simplify the explanation to return the mtime of the URL using the Last-Modified header (and keep the other 2 sentences)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8b6f9c5.

rezib added 2 commits January 27, 2026 18:03
When starting VM with a remote image and local copy is present, try to
send HEAD request on remote URL to get its Last-Modified header for
comparison with local copy mtime on filesystem. If mtime is older than
remote URL Last-Modified, remove local copy and download latest VM image.
@rezib rezib force-pushed the pr/vm-download-check branch from 8f372c2 to 8b6f9c5 Compare January 27, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants