Difference between revisions of "Deprecation"

From CRIU
Jump to navigation Jump to search
Line 1: Line 1:
This page collects stuff that is considered to be deprecated (and is about to be removed)
+
This page collects stuff that is considered to be deprecated (and is about to be removed) and how to use older CRIU versions
  
== Current plan ==
+
== Problem ==
; Per-pid rlimits, itimers and posix_timers image file
+
 
: Now all this stuff sit in the core entry (all since 1.3)
+
Sometimes we reconsider the way CRIU works and rewrite some functionality. In order not to break backward compatibility at once, the old code is kept in CRIU for a while, but is declared as deprecated. After some time the old code is just removed and only the newer version of it stays.
 +
 
 +
So, for a deprecated functionality there are two versions of CRIU -- D and R -- that work differently with it. Before version D the old functionality exists. Between D and R both -- old and new ways of doing things work, after R only new code works, old behavior is not longer supported.
 +
 
 +
When old functionality is deprecated (and eventually removed) we try to encourage people to upgrade CRIU-s and the way they use. So, if one starts CRIU of version between D and R and the deprecated functionality is requested, the message
 +
 
 +
<pre>
 +
Deprecated functionality (...) rejected.
 +
Use the --deprecated option or set CRIU_DEPRECATED environment.
 +
For details visit https://criu.org/Deprecation.
 +
</pre>
  
; Separate image file for epoll tfds
+
appears in logs and criu exits. To continue working "the old way" w/o upgrading CRIU one may use the --deprecated option in CLI or set the CRIU_DEPRECATED environment variable.
: It's now merged into epoll image since 1.4
 
  
; The <code>criu exec</code> action
+
But (!) it's important to upgrade anyway, since after some time the old functionality will still be removed and even the --deprecated/CRIU_DEPRECATED won't help.
: Should be deprecated with [[Compel]]
 
  
; Per-PID logs
+
Below is the list of stuff we deprecate with explanations.
: Not sure whether anybody is using it
 
  
; No file records for ttys
+
== Deprecated stuff ==
: See collect_one_tty(). Older versions of criu didn't have reg_file_entry for ttys.
 
  
== Already deprecated stuff ==
+
== Removed stuff ==
 
; The <code>criu show</code> action
 
; The <code>criu show</code> action
: Deprecated in with [[CRIT]] in [[Download/criu/2.0|2.0]]
+
: Removed in with [[CRIT]] in [[Download/criu/2.0|2.0]]
  
 
; No ids.img files
 
; No ids.img files
: We've been writing these files since at least v0.4, deprecated since [[Download/criu/2.1|2.1]]
+
: We've been writing these files since at least v0.4, removed since [[Download/criu/2.1|2.1]]
  
 
; The <code>--namespaces</code> option
 
; The <code>--namespaces</code> option
Line 35: Line 41:
 
; Old page-read
 
; Old page-read
 
: Used at ancient times when no pagemaps existed, removed in [[Download/criu/2.4|2.4]]
 
: Used at ancient times when no pagemaps existed, removed in [[Download/criu/2.4|2.4]]
 +
 +
== Plans ==
 +
; Per-pid rlimits, itimers and posix_timers image file
 +
: Now all this stuff sit in the core entry (all since 1.3)
 +
 +
; Separate image file for epoll tfds
 +
: It's now merged into epoll image since 1.4
 +
 +
; The <code>criu exec</code> action
 +
: Should be deprecated with [[Compel]]
 +
 +
; Per-PID logs
 +
: Not sure whether anybody is using it
 +
 +
; No file records for ttys
 +
: See collect_one_tty(). Older versions of criu didn't have reg_file_entry for ttys.
  
 
== See also ==
 
== See also ==

Revision as of 10:59, 12 August 2016

This page collects stuff that is considered to be deprecated (and is about to be removed) and how to use older CRIU versions

Problem

Sometimes we reconsider the way CRIU works and rewrite some functionality. In order not to break backward compatibility at once, the old code is kept in CRIU for a while, but is declared as deprecated. After some time the old code is just removed and only the newer version of it stays.

So, for a deprecated functionality there are two versions of CRIU -- D and R -- that work differently with it. Before version D the old functionality exists. Between D and R both -- old and new ways of doing things work, after R only new code works, old behavior is not longer supported.

When old functionality is deprecated (and eventually removed) we try to encourage people to upgrade CRIU-s and the way they use. So, if one starts CRIU of version between D and R and the deprecated functionality is requested, the message

Deprecated functionality (...) rejected.
Use the --deprecated option or set CRIU_DEPRECATED environment.
For details visit https://criu.org/Deprecation.

appears in logs and criu exits. To continue working "the old way" w/o upgrading CRIU one may use the --deprecated option in CLI or set the CRIU_DEPRECATED environment variable.

But (!) it's important to upgrade anyway, since after some time the old functionality will still be removed and even the --deprecated/CRIU_DEPRECATED won't help.

Below is the list of stuff we deprecate with explanations.

Deprecated stuff

Removed stuff

The criu show action
Removed in with CRIT in 2.0
No ids.img files
We've been writing these files since at least v0.4, removed since 2.1
The --namespaces option
It was used when we didn't have /proc/pid/ns stuff, now it's useless, removed in 2.2
Per-pid fdinfo.img file
The new layout (marked with respective bit in inventory) is per-fdtable-id, removed in 2.4
Per-pid file locks
Now all locks sit in the file-locks.img file, removed in 2.4
Old page-read
Used at ancient times when no pagemaps existed, removed in 2.4

Plans

Per-pid rlimits, itimers and posix_timers image file
Now all this stuff sit in the core entry (all since 1.3)
Separate image file for epoll tfds
It's now merged into epoll image since 1.4
The criu exec action
Should be deprecated with Compel
Per-PID logs
Not sure whether anybody is using it
No file records for ttys
See collect_one_tty(). Older versions of criu didn't have reg_file_entry for ttys.

See also

What's bad with V1 images