talm upgrade rewrites install.image in every -f file but upgrades only the first file's nodes

Abierto
#244 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
go

Línea de trabajo

Start by reading the talm upgrade path around filesToProcess[0] and writeBackInstallImageToFiles, then compare it with the Long help text cited in the issue. Decide what multiple -f files mean for upgrade before changing behavior. Done means the chosen semantics and the write-back behavior are consistent, so untouched nodes are not left claiming an image they never ran.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area/commands area/upgrade kind/bug

talm upgrade takes its node set from the modeline of the first -f file, but the post-upgrade write-back runs over the whole list:

configFile := filesToProcess[0]                          // nodes come from here
writeBackInstallImageToFiles(filesToProcess, targetImage) // every file is rewritten

So talm upgrade -f nodes/node0.yaml -f nodes/node1.yaml upgrades node0 and then rewrites machine.install.image in both bodies. node1.yaml ends up claiming an image node1 never ran, and the next talm apply merges that claim into its config.

That is the failure the write-back was built to prevent, inverted. The help text spells out the reasoning — "without this a follow-up talm apply would merge the stale install.image over the chart-rendered new value" — which is exactly what now happens to the nodes that were never touched.

Both halves are documented in the Long help as separate sentences and never reconciled. Before changing either, the -f list needs a decided meaning for upgrade: it is not the same as for apply, where the first file anchors and the rest are side-patches.

Lenguaje dominante
Go
Estrellas
493
Forks
23
Merge medio
5 d 13 h
PR fusionados (30 d)
3

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cozystack/talm

Todos los issues de cozystack/talm

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.