Skip to content

Commit

Permalink
Merge pull request #1273 from akshata-s-banoshi/odim-7450-update-ubun…
Browse files Browse the repository at this point in the history
…tu-22.04

update ubuntu version to 22.04
  • Loading branch information
jeevan-kamkar authored Jul 11, 2023
2 parents 8205045 + a5a7464 commit 11d5770
Show file tree
Hide file tree
Showing 32 changed files with 55 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

build:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:

- name: Set up Go 1.19.5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/odimra_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
build:
name: Deploy
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
continue-on-error: false
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.accountSession
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY install/Docker/dockerfiles/build/accountSession.sh .
RUN ./accountSession.sh


FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.aggregation
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY install/Docker/dockerfiles/build/aggregation.sh .
RUN ./aggregation.sh


FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.api
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/api.sh .
RUN ./api.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.compositionService
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FROM odim:5.1 as build-stage
FROM cs:1.0 as build-stage-cs


FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#License for the specific language governing permissions and limitations
# under the License.

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.dellplugin
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/dellplugin.sh .
RUN ./dellplugin.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
4 changes: 2 additions & 2 deletions install/Docker/dockerfiles/Dockerfile.etcd
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
# under the License.

# This is Dockerfile to build etcd image
FROM ubuntu:20.04 as etcd-build
FROM ubuntu:22.04 as etcd-build

LABEL version="1.0"
LABEL ubuntuVersion="18.04"
LABEL etcdVersion="3.4.15"
LABEL description="etcd docker image built on top of ubuntu:20.04"
LABEL description="etcd docker image built on top of ubuntu:22.04"

# This is the release of etcd to pull in.
ENV ETDC_VERSION=3.4.15
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.events
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/events.sh .
RUN ./events.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.fabrics
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/fabrics.sh .
RUN ./fabrics.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.grfplugin
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/grfplugin.sh .
RUN ./grfplugin.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
6 changes: 3 additions & 3 deletions install/Docker/dockerfiles/Dockerfile.kafka
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
# under the License.

# This is Dockerfile to build kafka image
FROM ubuntu:20.04 as kafka-build
FROM ubuntu:22.04 as kafka-build

LABEL version="3.0"
LABEL ubuntuVersion="20.04"
LABEL ubuntuVersion="22.04"
LABEL kafkaVersion="3.4.0"
LABEL description="Kafka docker image built on top of ubuntu:20.04"
LABEL description="Kafka docker image built on top of ubuntu:22.04"

WORKDIR /kafka/

Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.lenovoplugin
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/lenovoplugin.sh .
RUN ./lenovoplugin.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.licenses
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/licenses.sh .
RUN ./licenses.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.managers
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/managers.sh .
RUN ./managers.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.systems
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/systems.sh .
RUN ./systems.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.task
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/task.sh .
RUN ./task.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.telemetry
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/telemetry.sh .
RUN ./telemetry.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.update
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/update.sh .
RUN ./update.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.urplugin
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM odim:5.1 as build-stage
COPY install/Docker/dockerfiles/build/urplugin.sh .
RUN ./urplugin.sh

FROM ubuntu:20.04
FROM ubuntu:22.04

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
6 changes: 3 additions & 3 deletions install/Docker/dockerfiles/Dockerfile.zookeeper
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
# under the License.

# This is Dockerfile to build zookeeper image
FROM ubuntu:20.04 as zookeeper-build
FROM ubuntu:22.04 as zookeeper-build

LABEL version="3.0"
LABEL ubuntuVersion="20.04"
LABEL ubuntuVersion="22.04"
LABEL kafkaVersion="3.4.0"
LABEL zookeeperVersion="3.8.1"
LABEL description="Zookeeper docker image built on top of ubuntu:20.04 using kafka:3.4.0 bundle"
LABEL description="Zookeeper docker image built on top of ubuntu:22.04 using kafka:3.4.0 bundle"

WORKDIR /zookeeper/

Expand Down
4 changes: 2 additions & 2 deletions lib-messagebus/datacommunicator/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ func bytesToPrivateKey(privateKey []byte) (*rsa.PrivateKey, error) {
MQ.RedisStreams.RSAPrivateKeyPath)
}

key, err := x509.ParsePKCS1PrivateKey(block.Bytes)
key, err := x509.ParsePKCS8PrivateKey(block.Bytes)
if err != nil {
return nil, fmt.Errorf("failed to parse DER encoded public key for the RSAPrivateKeyPath:%s with %v",
MQ.RedisStreams.RSAPrivateKeyPath, err)
}
return key, nil
return key.(*rsa.PrivateKey), nil
}
4 changes: 2 additions & 2 deletions lib-utilities/common/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ func DecryptWithPrivateKey(ciphertext []byte) ([]byte, error) {
return nil, fmt.Errorf("error while trying to decrypt pem block: %v", err)
}
}
key, err := x509.ParsePKCS1PrivateKey(b)
key, err := x509.ParsePKCS8PrivateKey(b)
if err != nil {
return nil, fmt.Errorf("error while parsing private key: %v", err)
}
hash := sha512.New()
plainText, err := rsa.DecryptOAEP(
hash,
rand.Reader,
key,
key.(*rsa.PrivateKey),
ciphertext,
nil,
)
Expand Down
4 changes: 2 additions & 2 deletions lib-utilities/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ func decryptRSAOAEPEncryptedPasswords(passwordFilePath string) ([]byte, error) {
Data.KeyCertConf.RSAPrivateKeyPath)
}

privateKey, err := x509.ParsePKCS1PrivateKey(block.Bytes)
privateKey, err := x509.ParsePKCS8PrivateKey(block.Bytes)
if err != nil {
return nil, fmt.Errorf("failed to parse DER encoded public key for the RSAPrivateKeyPath:%s with %v",
Data.KeyCertConf.RSAPrivateKeyPath, err)
Expand All @@ -398,7 +398,7 @@ func decryptRSAOAEPEncryptedPasswords(passwordFilePath string) ([]byte, error) {
}

rng := rand.Reader
password, err := rsa.DecryptOAEP(sha512.New(), rng, privateKey, ct, nil)
password, err := rsa.DecryptOAEP(sha512.New(), rng, privateKey.(*rsa.PrivateKey), ct, nil)
if err != nil {
return nil, fmt.Errorf("password decryption failed for the passwordFilePath:%s with %v", passwordFilePath, err)
}
Expand Down
2 changes: 1 addition & 1 deletion odim-controller/odimra/group_vars/all/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ docker_dep_pkgs:
docker_pkgs:
# - docker-ce=5:20.10.12~3-0~ubuntu-focal
# - docker-ce-cli=5:20.10.12~3-0~ubuntu-focal
- containerd.io=1.4.12-1
- containerd.io=1.6.4-1
- pigz
docker_pkgs_wo_version:
- docker-ce
Expand Down
4 changes: 2 additions & 2 deletions plugin-dell/dputilities/utility.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func GetPlainText(ctx context.Context, password []byte) ([]byte, error) {
return []byte{}, err
}
}
key, err := x509.ParsePKCS1PrivateKey(b)
key, err := x509.ParsePKCS8PrivateKey(b)
if err != nil {
l.LogWithFields(ctx).Error(err.Error())
return []byte{}, err
Expand All @@ -81,7 +81,7 @@ func GetPlainText(ctx context.Context, password []byte) ([]byte, error) {
return rsa.DecryptOAEP(
hash,
rand.Reader,
key,
key.(*rsa.PrivateKey),
password,
nil,
)
Expand Down
8 changes: 7 additions & 1 deletion plugin-dell/dputilities/utility_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,16 @@ func TestGetPlainText(t *testing.T) {
t.Fatalf("error encrypting password: %v", err)
}

// Marshal the rsa private key to PKCS8 format
marshalledPrivateKey, err := x509.MarshalPKCS8PrivateKey(key)
if err != nil {
t.Fatalf("error marshalling private key : %v", err)
}

// Convert the private key to PEM format
priv := pem.EncodeToMemory(&pem.Block{
Type: "RSA PRIVATE KEY",
Bytes: x509.MarshalPKCS1PrivateKey(key),
Bytes: marshalledPrivateKey,
})
dpmodel.PluginPrivateKey = priv
// Decrypt the password using the GetPlainText function
Expand Down
8 changes: 4 additions & 4 deletions plugin-lenovo/lputilities/utility.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
//License for the specific language governing permissions and limitations
// under the License.

//Package lputilities ...
// Package lputilities ...
package lputilities

import (
Expand Down Expand Up @@ -60,7 +60,7 @@ func GetPlainText(password []byte) ([]byte, error) {
return []byte{}, err
}
}
key, err := x509.ParsePKCS1PrivateKey(b)
key, err := x509.ParsePKCS8PrivateKey(b)
if err != nil {
log.Info(err.Error())
return []byte{}, err
Expand All @@ -71,13 +71,13 @@ func GetPlainText(password []byte) ([]byte, error) {
return rsa.DecryptOAEP(
hash,
rand.Reader,
key,
key.(*rsa.PrivateKey),
password,
nil,
)
}

//Status holds the Status of plugin it will be intizaied during startup time
// Status holds the Status of plugin it will be intizaied during startup time
var Status lpresponse.Status

// PluginStartTime hold the time from which plugin started
Expand Down
8 changes: 4 additions & 4 deletions plugin-redfish/rfputilities/utility.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
//License for the specific language governing permissions and limitations
// under the License.

//Package rfputilities ...
// Package rfputilities ...
package rfputilities

import (
Expand Down Expand Up @@ -60,7 +60,7 @@ func GetPlainText(password []byte) ([]byte, error) {
return []byte{}, err
}
}
key, err := x509.ParsePKCS1PrivateKey(b)
key, err := x509.ParsePKCS8PrivateKey(b)
if err != nil {
log.Info(err.Error())
return []byte{}, err
Expand All @@ -71,13 +71,13 @@ func GetPlainText(password []byte) ([]byte, error) {
return rsa.DecryptOAEP(
hash,
rand.Reader,
key,
key.(*rsa.PrivateKey),
password,
nil,
)
}

//Status holds the Status of plugin it will be intizaied during startup time
// Status holds the Status of plugin it will be intizaied during startup time
var Status rfpresponse.Status

// PluginStartTime hold the time from which plugin started
Expand Down
4 changes: 2 additions & 2 deletions plugin-unmanaged-racks/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func decryptRSAOAEPEncryptedPasswords(passwordFilePath, RSAPrivateKeyPath string
RSAPrivateKeyPath)
}

privateKey, err := x509.ParsePKCS1PrivateKey(block.Bytes)
privateKey, err := x509.ParsePKCS8PrivateKey(block.Bytes)
if err != nil {
return nil, fmt.Errorf("failed to parse DER encoded public key for the RSAPrivateKeyPath:%s with %v",
RSAPrivateKeyPath, err)
Expand All @@ -181,7 +181,7 @@ func decryptRSAOAEPEncryptedPasswords(passwordFilePath, RSAPrivateKeyPath string
}

rng := rand.Reader
password, err := rsa.DecryptOAEP(sha512.New(), rng, privateKey, ct, nil)
password, err := rsa.DecryptOAEP(sha512.New(), rng, privateKey.(*rsa.PrivateKey), ct, nil)
if err != nil {
return nil, fmt.Errorf("password decryption failed for the passwordFilePath:%s with %v", passwordFilePath, err)
}
Expand Down
Loading

0 comments on commit 11d5770

Please sign in to comment.