Hello community, here is the log from the commit of package conmon for openSUSE:Factory checked in at 2019-11-06 13:47:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/conmon (Old) and /work/SRC/openSUSE:Factory/.conmon.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "conmon" Wed Nov 6 13:47:40 2019 rev:4 rq:744428 version:2.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/conmon/conmon.changes 2019-09-25 00:56:45.257904095 +0200 +++ /work/SRC/openSUSE:Factory/.conmon.new.2990/conmon.changes 2019-11-06 13:47:44.959612878 +0100 @@ -1,0 +2,6 @@ +Tue Oct 29 09:03:03 UTC 2019 - Sascha Grunert <sgrun...@suse.com> + +- Add CONN_SOCK_BUF_SIZE to config +- Fix bug to close the sync pipe before exit command + +------------------------------------------------------------------- Old: ---- conmon-2.0.1.tar.xz New: ---- conmon-2.0.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ conmon.spec ++++++ --- /var/tmp/diff_new_pack.dJsKWH/_old 2019-11-06 13:47:45.915613914 +0100 +++ /var/tmp/diff_new_pack.dJsKWH/_new 2019-11-06 13:47:45.919613919 +0100 @@ -17,7 +17,7 @@ Name: conmon -Version: 2.0.1 +Version: 2.0.2 Release: 0 Summary: An OCI container runtime monitor License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.dJsKWH/_old 2019-11-06 13:47:45.947613949 +0100 +++ /var/tmp/diff_new_pack.dJsKWH/_new 2019-11-06 13:47:45.947613949 +0100 @@ -2,8 +2,8 @@ <service name="tar_scm" mode="disabled"> <param name="url">https://github.com/containers/conmon</param> <param name="scm">git</param> -<param name="versionformat">2.0.1</param> -<param name="revision">v2.0.1</param> +<param name="versionformat">2.0.2</param> +<param name="revision">v2.0.2</param> </service> <service name="recompress" mode="disabled"> <param name="file">conmon-*.tar</param> ++++++ conmon-2.0.1.tar.xz -> conmon-2.0.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conmon-2.0.1/.cirrus.yml new/conmon-2.0.2/.cirrus.yml --- old/conmon-2.0.1/.cirrus.yml 2019-09-13 17:34:08.000000000 +0200 +++ new/conmon-2.0.2/.cirrus.yml 2019-10-10 14:41:45.000000000 +0200 @@ -54,7 +54,7 @@ # and storage. gcp_credentials: ENCRYPTED[13e51806369f650e6ccc326338deeb3c24052fc0a7be29beef2b96da551aed3200abbb6c6406a936bb4388fb2758405c] -# Default compute settings unless overriden within tasks (below) +# Default compute settings unless overridden within tasks (below) gce_instance: {"image_project": "conmon-222014", "zone": "us-central1-f", "cpu": 4, "memory": "16Gb", "disk": 200, "image_name": "no-image-specified-in-task"} # Default timeout for each task @@ -72,7 +72,7 @@ # Generate multiple parallel tasks, covering all possible # 'matrix' combinations. matrix: - # Images are generated separetly, from build_images_task (below) + # Images are generated separately, from build_images_task (below) image_name: "${FEDORA_CACHE_IMAGE_NAME}" env: @@ -128,7 +128,7 @@ - ./hack/tree_status.sh # Test building of new cache-images for future PR testing, in this PR. -# Output images will be stored only for a very short time, then automaticly deleted. +# Output images will be stored only for a very short time, then automatically deleted. test_cache_images_task: only_if: >- @@ -188,3 +188,18 @@ setup_environment_script: '$SCRIPT_BASE/setup_environment.sh' cache_images_script: '$SCRIPT_BASE/build_vm_images.sh' + +# Build the static binary +static_binary_task: + depends_on: + - 'config' + gce_instance: + image_name: "${FEDORA_BASE_IMAGE}" + cpu: 4 + memory: 4 + disk: 200 + script: + - dnf install -y podman make git gcc + - make containerized + binaries_artifacts: + path: "bin/conmon" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conmon-2.0.1/VERSION new/conmon-2.0.2/VERSION --- old/conmon-2.0.1/VERSION 2019-09-13 17:34:08.000000000 +0200 +++ new/conmon-2.0.2/VERSION 2019-10-10 14:41:45.000000000 +0200 @@ -1 +1 @@ -2.0.1 +2.0.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conmon-2.0.1/cmd/conmon-config/conmon-config.go new/conmon-2.0.2/cmd/conmon-config/conmon-config.go --- old/conmon-2.0.1/cmd/conmon-config/conmon-config.go 2019-09-13 17:34:08.000000000 +0200 +++ new/conmon-2.0.2/cmd/conmon-config/conmon-config.go 2019-10-10 14:41:45.000000000 +0200 @@ -14,11 +14,12 @@ #define BUF_SIZE %d #define STDIO_BUF_SIZE %d +#define CONN_SOCK_BUF_SIZE %d #define DEFAULT_SOCKET_PATH "%s" #endif // CONFIG_H ` - if err := ioutil.WriteFile("config.h", []byte(fmt.Sprintf(output, config.BufSize, config.BufSize, config.ContainerAttachSocketDir)), 0644); err != nil { + if err := ioutil.WriteFile("config.h", []byte(fmt.Sprintf(output, config.BufSize, config.BufSize, config.ConnSockBufSize, config.ContainerAttachSocketDir)), 0644); err != nil { fmt.Errorf(err.Error()) } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conmon-2.0.1/runner/config/config.go new/conmon-2.0.2/runner/config/config.go --- old/conmon-2.0.1/runner/config/config.go 2019-09-13 17:34:08.000000000 +0200 +++ new/conmon-2.0.2/runner/config/config.go 2019-10-10 14:41:45.000000000 +0200 @@ -3,4 +3,7 @@ const ( // BufSize is the size of buffers passed in to sockets BufSize = 8192 + // ConnSockBufSize is the size of the socket used for + // to attach to the container + ConnSockBufSize = 32768 ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conmon-2.0.1/src/config.h new/conmon-2.0.2/src/config.h --- old/conmon-2.0.1/src/config.h 2019-09-13 17:34:08.000000000 +0200 +++ new/conmon-2.0.2/src/config.h 2019-10-10 14:41:45.000000000 +0200 @@ -4,6 +4,7 @@ #define BUF_SIZE 8192 #define STDIO_BUF_SIZE 8192 +#define CONN_SOCK_BUF_SIZE 32768 #define DEFAULT_SOCKET_PATH "/var/run/crio" #endif // CONFIG_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conmon-2.0.1/src/conmon.c new/conmon-2.0.2/src/conmon.c --- old/conmon-2.0.1/src/conmon.c 2019-09-13 17:34:08.000000000 +0200 +++ new/conmon-2.0.2/src/conmon.c 2019-10-10 14:41:45.000000000 +0200 @@ -42,6 +42,7 @@ #define CGROUP2_SUPER_MAGIC 0x63677270 #endif +static int sync_pipe_fd = -1; static volatile pid_t container_pid = -1; static volatile pid_t create_pid = -1; static gboolean opt_version = FALSE; @@ -605,7 +606,6 @@ return ret; } -#define CONN_SOCK_BUF_SIZE 32 * 1024 /* Match the write size in CopyDetachable */ static gboolean conn_sock_cb(int fd, GIOCondition condition, gpointer user_data) { char buf[CONN_SOCK_BUF_SIZE]; @@ -844,7 +844,7 @@ g_main_loop_quit(main_loop); } -static void write_sync_fd(int sync_pipe_fd, int res, const char *message) +static void write_sync_fd(int fd, int res, const char *message) { _cleanup_free_ char *escaped_message = NULL; _cleanup_free_ char *json = NULL; @@ -859,7 +859,7 @@ ssize_t len; - if (sync_pipe_fd == -1) + if (fd == -1) return; if (message) { @@ -870,7 +870,7 @@ } len = strlen(json); - if (write_all(sync_pipe_fd, json, len) != len) { + if (write_all(fd, json, len) != len) { pexit("Unable to send container stderr message to parent"); } } @@ -1080,6 +1080,11 @@ gchar **args; size_t n_args = 0; + if (sync_pipe_fd > 0) { + close(sync_pipe_fd); + sync_pipe_fd = -1; + } + if (signal(SIGCHLD, SIG_DFL) == SIG_ERR) { _pexit("Failed to reset signal for SIGCHLD"); } @@ -1138,7 +1143,6 @@ int slavefd_stderr = -1; char buf[BUF_SIZE]; int num_read; - int sync_pipe_fd = -1; int attach_pipe_fd = -1; int start_pipe_fd = -1; GError *error = NULL; @@ -1589,7 +1593,7 @@ * conmon to only send one value down this pipe, which will later be the exit code * Thus, if we are legacy and we are exec, skip this write. */ - if (opt_api_version >= 1 || !opt_exec) + if ((opt_api_version >= 1 || !opt_exec) && sync_pipe_fd >= 0) write_sync_fd(sync_pipe_fd, container_pid, NULL); setup_oom_handling(container_pid); @@ -1681,7 +1685,7 @@ } /* Send the command exec exit code back to the parent */ - if (opt_exec) + if (opt_exec && sync_pipe_fd >= 0) write_sync_fd(sync_pipe_fd, exit_status, exit_message); if (attach_symlink_dir_path != NULL && unlink(attach_symlink_dir_path) == -1 && errno != ENOENT)