Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GenericContainer with type: airship skips empty lines in stdout #471

Open
aodinokov opened this issue Feb 23, 2021 · 10 comments
Open

GenericContainer with type: airship skips empty lines in stdout #471

aodinokov opened this issue Feb 23, 2021 · 10 comments
Labels
bug Something isn't working priority/low Items that are considered non-critical for functionality, such as quality of life improvements size l
Milestone

Comments

@aodinokov
Copy link

aodinokov commented Feb 23, 2021

Describe the bug
Before switching back to GenericContainer type:krm (see this patchset) execution of

airshipctl phase run secret-generate

during gate script run produced file /tmp/airship/airshipctl/manifests/site/test-site/target/generator/results/generated/secrets.yaml
that contains:

...
  pgp:
  - created_at: '2021-02-12T17:01:44Z'
    enc: |-
      -----BEGIN PGP MESSAGE-----
      wcBMAyUpShfNkFB/AQgAibVYA6Cu3LcZ0/Q//4DRpUnVQ8iRUfTBAzDihvE36hFt
      haKwbA/zwdivwNpVCdyw0qoAGwMrXlaSFhsrpdXDNV1dPqVoOzRd5EBIl13xbQGP
      hqR4c4BKIkJM4hGO3LpNNLi6cR9lMmUi06TGVp2GkO8aCVmbTK6Q8RdHRtKisxfb
      pEpiMl9vpequ2IgnWhd+XSy6rCMWpldLzqT1dBMSjSON0TBtLOXB2gqWaszGNhDs
      pfuYo1F0xO86HblgOURTLJ+lr0rhPMn55iiNL1JG5hQcj0to4UKTCKCpOZZrAk0n
      MbfrwIRDC9Nd5xVjl/TNA1IQN9DAapHYWMMHsl3LOdLgAeR0uJnuZ5rwHEokMits
      zhxV4RHG4BfgjOHP5uBw4ubrJxjgHeXL4YBiGY+oPNtaLRI+xzXtw7uT27pwa0ww
      7PFJ3SGcZeCV5ImYQXqdwF70smk47EMHNUbijA5WNeEpkQA=
      =Zv9X
      -----END PGP MESSAGE-----
    fp: FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4

The expected result should look like

...
  pgp:
  - created_at: '2021-02-12T17:01:44Z'
    enc: |-
      -----BEGIN PGP MESSAGE-----

      wcBMAyUpShfNkFB/AQgAibVYA6Cu3LcZ0/Q//4DRpUnVQ8iRUfTBAzDihvE36hFt
      haKwbA/zwdivwNpVCdyw0qoAGwMrXlaSFhsrpdXDNV1dPqVoOzRd5EBIl13xbQGP
      hqR4c4BKIkJM4hGO3LpNNLi6cR9lMmUi06TGVp2GkO8aCVmbTK6Q8RdHRtKisxfb
      pEpiMl9vpequ2IgnWhd+XSy6rCMWpldLzqT1dBMSjSON0TBtLOXB2gqWaszGNhDs
      pfuYo1F0xO86HblgOURTLJ+lr0rhPMn55iiNL1JG5hQcj0to4UKTCKCpOZZrAk0n
      MbfrwIRDC9Nd5xVjl/TNA1IQN9DAapHYWMMHsl3LOdLgAeR0uJnuZ5rwHEokMits
      zhxV4RHG4BfgjOHP5uBw4ubrJxjgHeXL4YBiGY+oPNtaLRI+xzXtw7uT27pwa0ww
      7PFJ3SGcZeCV5ImYQXqdwF70smk47EMHNUbijA5WNeEpkQA=
      =Zv9X
      -----END PGP MESSAGE-----
    fp: FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4

Steps To Reproduce
Minimal steps to reproduce the issue:

  1. revert https://review.opendev.org/c/airship/airshipctl/+/776494
  2. run gating scripts from tools/gate/ in the correct order.
  3. it will fail on the step 23_generate_secrets.sh after generation of secret, because incorrect secret format doesn't allow to decrypt it

Expected behavior
The generated file must contain empty string and decryption must work (script must not fail)

Environment

  • airshipctl Version: all
  • Operating System: Ubuntu 18.04 and 20.04
  • Kernel version: 4.15.0-135-generic
  • Kubernetes Version: n/a
  • Go version: 1.15+
  • Hardware specs: 4 vCPUs, 32GB RAM

cc: @teoyaomiqui

@aodinokov aodinokov added bug Something isn't working triage Needs evaluation by project members labels Feb 23, 2021
@jezogwza jezogwza added this to the v2.0 milestone Feb 24, 2021
@jezogwza jezogwza added good first issue Good for newcomers and removed triage Needs evaluation by project members labels Feb 24, 2021
@mattmceuen
Copy link
Contributor

@aodinokov I know you put in a workaround for this but which switches back to a KRM format until the Airship format is handled correctly. With that in mind, what is the urgency on resolving this bug -- do you think it's required for Airship v2.0, or could it wait for a v2.1?

@teoyaomiqui
Copy link
Contributor

@mattmceuen, In my opinion, it is not urgent. Airship containers still can be used, as designed to perform all actions, for example, kubectl commands, or image building, while KRM containers are used to process YAMLs.

@aodinokov
Copy link
Author

@mattmceuen I agree with @teoyaomiqui - KRM-based generic container is enough. Airship-generic container was the attempt to keep the same API, but extend features, e.g. be able to call container in privileged mode, that was necessary for image-builder. Since image-builder was integrated in another way, it's not urgent.

@teoyaomiqui
Copy link
Contributor

I don't think it is a good first issue, the fix may not be lengthy, but the design of the solution requires a deep understanding of go, docker SDK, krm functions, and airshipctl itself.
@jezogwza I will remove the good first issue label. If you think otherwise, please put it back :).

@teoyaomiqui teoyaomiqui added size l and removed good first issue Good for newcomers labels Mar 2, 2021
@aodinokov
Copy link
Author

I don't think it is a good first issue, the fix may not be lengthy, but the design of the solution requires a deep understanding of go, docker SDK, krm functions, and airshipctl itself.

I completely agree with @teoyaomiqui. Based on what I saw in it won't be so easy.

@lb4368 lb4368 added the priority/low Items that are considered non-critical for functionality, such as quality of life improvements label Mar 3, 2021
@lb4368 lb4368 modified the milestones: v2.0, v2.1 Mar 10, 2021
@teoyaomiqui teoyaomiqui self-assigned this Mar 20, 2021
@lb4368 lb4368 modified the milestones: v2.1, Future May 6, 2021
@joshuaherrera
Copy link
Contributor

I can work on this, please assign to me.

@aodinokov
Copy link
Author

@joshuaherrera , I don't think it's relevant anymore,
since we copied runfn and plan to have only 1 implementation that can do everything instead of 2: Airship-based and kyaml-based as we had before.

cc @raliev12

@joshuaherrera
Copy link
Contributor

@aodinokov ok if this isn't relevant I will work on another issue. Thank you.

@eak13
Copy link

eak13 commented Dec 1, 2021

@aodinokov do we want to go ahead & close this then? Thanks.

@aodinokov
Copy link
Author

aodinokov commented Dec 1, 2021

@eak13 , We were supposed to get rid of Airship type of generic containers in #597
Since it's closed, I guess we can close this as well.

cc: @raliev12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority/low Items that are considered non-critical for functionality, such as quality of life improvements size l
Projects
None yet
Development

No branches or pull requests

7 participants