Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41989

Binary user-data in jenkins.log

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Component/s: jclouds-plugin
    • Labels:
      None
    • Environment:
      jenkins: 2.32.2
      jclouds-plugin: 2.13
      openstack driven cloud
    • Similar Issues:

      Description

      After migrating to configfile stored user-data there is binary data in jenkins logs:

      INFO: >> creating new server region(gov-1) name(debian-glue-trusty-365) image(ab59ca06-469e-4adf-b122-dacc6aa41dbf) flavor(xlarge) options(CreateServerOptions{keyName=jenkins-slave, securityGroupNames=[jclouds-debian-glue-trusty], metadata={Name=debian-glue-trusty, jclouds-group=debian-glue-trusty, jclouds_tags=jclouds_securityGroup}, userData=��Y��J����W�4=#���>���/��f�wl����:��]�4��!3㋌Ȍ��?�_����2{�Ƥ��>\ֲI��G�vu��?�&�ҷ6�<�3]�?�~^��˴�ooC�w飩M����S��X����o��ǜN[:�?��/���T�Ѵ?��)_n���v�����ۗȜ��T.��9��WZ��Ͽ�>Zߢa�s��)N�X��I��1�9��>�1/ѥI4��b~��|��c���D��6?�)�Q�Sڤќ��Q����N����?>?4'H��Y8��Z��w�r���ˊ��������DI���Q���?�;���e���
      �������4T�n����slkH͡MFs4G�#EEw$�M:�c熩����6�v��QP                                                                           �iUg����`��c��B����
      m��S����  JzaQ  \�f�
                                  ��0��4"��L��
      

        Attachments

          Activity

          Hide
          felfert Fritz Elfert added a comment - - edited

          Depending on the cloud provider, this might be ok (user-Data can be gzip compressed if the cloud provider supports it).
          There can't be done anything about the logging (that's happening deep inside jclouds somewhere) - except logging nothing at all which I decided against.
          What cloud provider are you using?

          Answer already given: It's openstack which does support gzip compressed userdata. So:
          Works as designed.

          See
          jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsCloud.java, lines 544ff
          and
          jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java, lines 581ff

          Show
          felfert Fritz Elfert added a comment - - edited Depending on the cloud provider, this might be ok (user-Data can be gzip compressed if the cloud provider supports it). There can't be done anything about the logging (that's happening deep inside jclouds somewhere) - except logging nothing at all which I decided against. What cloud provider are you using? Answer already given: It's openstack which does support gzip compressed userdata. So: Works as designed. See jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsCloud.java, lines 544ff and jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java, lines 581ff
          Hide
          felfert Fritz Elfert added a comment -

          I have added a note in the release notes of v2.12 (gzip compressed userData was introduced in that release):

          See:
          https://wiki.jenkins-ci.org/pages/diffpagesbyversion.action?pageId=46336245&selectedPageVersions=44&selectedPageVersions=42

          Show
          felfert Fritz Elfert added a comment - I have added a note in the release notes of v2.12 (gzip compressed userData was introduced in that release): See: https://wiki.jenkins-ci.org/pages/diffpagesbyversion.action?pageId=46336245&selectedPageVersions=44&selectedPageVersions=42
          Hide
          vills Vil Surkin added a comment -

          Fritz Elfert thanks. Should i fill bug to jclouds? Or those logs generated not by this library?

          Show
          vills Vil Surkin added a comment - Fritz Elfert thanks. Should i fill bug to jclouds? Or those logs generated not by this library?
          Hide
          felfert Fritz Elfert added a comment -

          I leave that to you but I I would not bother
          After all, this is only a debugging feature, not intended for normal use. In fact, debug-logging in jclouds is disabled by default and it is explicitely enabled by the jclouds plugin, because I think it it is still useful.
          If you really insist, I would rather write a logging filter which matches that specific log message and then replaces the binary data by some human-readable placeholder.

          BTW:
          If you are experimenting with cloud-init and something does not work as you expected, then there are better ways to debug this and you can always have a look into the decompressed data on your openstack instance directly (it usually can be found somewhere in /var/lib/cloud*/ e.g. on debian it is in /var/lib/cloud/instance/user-data.txt.i)

          Show
          felfert Fritz Elfert added a comment - I leave that to you but I I would not bother After all, this is only a debugging feature, not intended for normal use. In fact, debug-logging in jclouds is disabled by default and it is explicitely enabled by the jclouds plugin, because I think it it is still useful. If you really insist, I would rather write a logging filter which matches that specific log message and then replaces the binary data by some human-readable placeholder. BTW: If you are experimenting with cloud-init and something does not work as you expected, then there are better ways to debug this and you can always have a look into the decompressed data on your openstack instance directly (it usually can be found somewhere in /var/lib/cloud*/ e.g. on debian it is in /var/lib/cloud/instance/user-data.txt.i)
          Hide
          vills Vil Surkin added a comment -

          No. It wasn't an experiment with cloud-config, but with jclouds plugin instead (after new release) . It's not critical bug, but why plugin print binary data to text (logs), that can't be read by a human?

          Another "problem" here appears by my opinion. You sad "this is only a debugging feature", but log entries appears with info-level.

          Show
          vills Vil Surkin added a comment - No. It wasn't an experiment with cloud-config, but with jclouds plugin instead (after new release) . It's not critical bug, but why plugin print binary data to text (logs), that can't be read by a human? Another "problem" here appears by my opinion. You sad "this is only a debugging feature", but log entries appears with info-level.
          Hide
          felfert Fritz Elfert added a comment - - edited

          See https://issues.apache.org/jira/browse/JCLOUDS-1239
          See https://github.com/jclouds/jclouds/pull/1061
          See https://github.com/jclouds/jclouds/pull/1062

          I also made a temporary local change in the jclouds-plugin. With that applied, the log now looks like this:

          >> creating new server region(RegionOne) name(foo-f2e) image(41c50bca-cb94-4dc4-b4ce-6c98242eaaa6) flavor(08fbed24-7fcf-42e3-bc5a-cdd7a701ef0c) options(CreateServerOptions{keyName=null, securityGroupNames=[default], metadata={Name=foo, jclouds-group=foo}, userData=<gzipped data (936 bytes)>, networks=[73cbec8a-f53d-41af-843b-1cd4a6afc025], availabilityZone=null, configDrive=false})
          

          => Will be released in 2.15 at a later date.

          Regarding debugging vs. INFO message level: I think you misunderstood me: I meant: I find it useful for finding out the reason if some of the parameters are wrong or missing (aka. debugging of wrongly entered parameters) and since INFO level is shown by default, I chose that. Normally, these messages would be DEBUG level and therefore not shown unless one sets specific properties. Before I raised the message level of these messages, users have always have asked "how can I enable logging" and I had to cite the jclouds docs for that.

          Show
          felfert Fritz Elfert added a comment - - edited See https://issues.apache.org/jira/browse/JCLOUDS-1239 See https://github.com/jclouds/jclouds/pull/1061 See https://github.com/jclouds/jclouds/pull/1062 I also made a temporary local change in the jclouds-plugin. With that applied, the log now looks like this: >> creating new server region(RegionOne) name(foo-f2e) image(41c50bca-cb94-4dc4-b4ce-6c98242eaaa6) flavor(08fbed24-7fcf-42e3-bc5a-cdd7a701ef0c) options(CreateServerOptions{keyName=null, securityGroupNames=[default], metadata={Name=foo, jclouds-group=foo}, userData=<gzipped data (936 bytes)>, networks=[73cbec8a-f53d-41af-843b-1cd4a6afc025], availabilityZone=null, configDrive=false}) => Will be released in 2.15 at a later date. Regarding debugging vs. INFO message level: I think you misunderstood me: I meant: I find it useful for finding out the reason if some of the parameters are wrong or missing (aka. debugging of wrongly entered parameters) and since INFO level is shown by default, I chose that. Normally, these messages would be DEBUG level and therefore not shown unless one sets specific properties. Before I raised the message level of these messages, users have always have asked "how can I enable logging" and I had to cite the jclouds docs for that.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Fritz Elfert
          Path:
          jclouds-plugin/pom.xml
          jclouds-plugin/src/findbugs/excludesFilter.xml
          jclouds-plugin/src/main/java/org/jclouds/openstack/nova/v2_0/options/CreateServerOptions.java
          pom.xml
          http://jenkins-ci.org/commit/jclouds-plugin/88c9e3ed99f0a2bea2baf2f6b61076f3396f887c
          Log:
          Work around JCLOUDS-1239. Fixes JENKINS-41989

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Fritz Elfert Path: jclouds-plugin/pom.xml jclouds-plugin/src/findbugs/excludesFilter.xml jclouds-plugin/src/main/java/org/jclouds/openstack/nova/v2_0/options/CreateServerOptions.java pom.xml http://jenkins-ci.org/commit/jclouds-plugin/88c9e3ed99f0a2bea2baf2f6b61076f3396f887c Log: Work around JCLOUDS-1239. Fixes JENKINS-41989

            People

            • Assignee:
              felfert Fritz Elfert
              Reporter:
              vills Vil Surkin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: