mirror of
https://github.com/containers/podman.git
synced 2025-08-26 03:01:31 +08:00
[v4.0-rhel] all: stop using deprecated GenerateNonCryptoID
Cherry-pick #15788 to v4.0-rhel branch per RHBZ 2157930 In view of https://github.com/containers/storage/pull/1337, do this: for f in $(git grep -l stringid.GenerateNonCryptoID | grep -v '^vendor/'); do sed -i 's/stringid.GenerateNonCryptoID/stringid.GenerateRandomID/g' $f; done Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:

committed by
tomsweeneyredhat

parent
11afff33da
commit
361ec22fe5
@ -167,7 +167,7 @@ func (r *Runtime) initContainerVariables(rSpec *spec.Spec, config *ContainerConf
|
||||
ctr.state = new(ContainerState)
|
||||
|
||||
if config == nil {
|
||||
ctr.config.ID = stringid.GenerateNonCryptoID()
|
||||
ctr.config.ID = stringid.GenerateRandomID()
|
||||
size, err := units.FromHumanSize(r.config.Containers.ShmSize)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "converting containers.conf ShmSize %s to an int", r.config.Containers.ShmSize)
|
||||
@ -184,7 +184,7 @@ func (r *Runtime) initContainerVariables(rSpec *spec.Spec, config *ContainerConf
|
||||
}
|
||||
// If the ID is empty a new name for the restored container was requested
|
||||
if ctr.config.ID == "" {
|
||||
ctr.config.ID = stringid.GenerateNonCryptoID()
|
||||
ctr.config.ID = stringid.GenerateRandomID()
|
||||
}
|
||||
// Reset the log path to point to the default
|
||||
ctr.config.LogPath = ""
|
||||
@ -453,7 +453,7 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai
|
||||
if vol.Name == "" {
|
||||
// Anonymous volume. We'll need to create it.
|
||||
// It needs a name first.
|
||||
vol.Name = stringid.GenerateNonCryptoID()
|
||||
vol.Name = stringid.GenerateRandomID()
|
||||
isAnonymous = true
|
||||
} else {
|
||||
// Check if it exists already
|
||||
|
Reference in New Issue
Block a user