Skip to content

Commit

Permalink
Merge branch 'lf-edge:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-zededa authored Jul 24, 2023
2 parents 2951e0f + c7cb0b8 commit 9227f72
Show file tree
Hide file tree
Showing 22 changed files with 802 additions and 619 deletions.
202 changes: 68 additions & 134 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,137 +2,71 @@
# the repo. Unless a later match takes precedence, these will
# be requested for review when someone opens a pull request.

* @eriknordmark

/pkg/edgeview/ @naiming-zededa
/pkg/newlog/ @naiming-zededa


/api/ @deitch
/build-tools/ @deitch
/libs/zedUpload/ @deitch
/pkg/newlog/ @deitch
/pkg/pillar/cas/ @deitch
/pkg/pillar/cmd/baseosmgr/ @deitch
/pkg/pillar/cmd/downloader/ @deitch
/pkg/pillar/cmd/volumemgr/ @deitch
/pkg/pillar/containerd/ @deitch
/pkg/rngd/ @deitch
/tools/ @deitch


/libs/zedUpload/ @christoph-zededa
/pkg/alpine/ @christoph-zededa
/pkg/dom0-ztools/ @christoph-zededa
/pkg/edgeview/ @christoph-zededa
/pkg/pillar/cmd/zedrouter/ @christoph-zededa
/pkg/pillar/zedcloud/ @christoph-zededa


/pkg/mkimage-raw-efi/ @jsfakian
/pkg/mkverification-raw-efi/ @jsfakian
/pkg/pillar/cmd/domainmgr/ @jsfakian
/pkg/verification/ @jsfakian
/tools/ @jsfakian


/pkg/grub/ @mikem-zed
/pkg/kernel/ @mikem-zed
/pkg/measure-config/ @mikem-zed
/pkg/new-kernel/ @mikem-zed
/pkg/pillar/cmd/ledmanager/ @mikem-zed
/pkg/pillar/cmd/tpmmgr/ @mikem-zed
/pkg/pillar/evetpm/ @mikem-zed
/pkg/pillar/hypervisor/ @mikem-zed
/pkg/uefi/ @mikem-zed
/pkg/xen-tools/ @mikem-zed
/pkg/xen/ @mikem-zed


/libs/depgraph/ @milan-zededa
/libs/nettrace/ @milan-zededa
/libs/reconciler/ @milan-zededa
/pkg/pillar/cmd/domainmgr/ @milan-zededa
/pkg/pillar/cmd/downloader/ @milan-zededa
/pkg/pillar/cmd/nim/ @milan-zededa
/pkg/pillar/cmd/zedagent/ @milan-zededa
/pkg/pillar/cmd/zedrouter/ @milan-zededa
/pkg/pillar/devicenetwork/ @milan-zededa
/pkg/pillar/dpcmanager/ @milan-zededa
/pkg/pillar/dpcreconciler/ @milan-zededa
/pkg/pillar/iptables/ @milan-zededa
/pkg/pillar/netdump/ @milan-zededa
/pkg/pillar/netmonitor/ @milan-zededa
/pkg/pillar/nireconciler/ @milan-zededa
/pkg/pillar/nistate/ @milan-zededa
/pkg/pillar/uplinkprober/ @milan-zededa
/pkg/pillar/utils/ @milan-zededa
/pkg/wwan/ @milan-zededa
/tests/eden/ @milan-zededa


/pkg/pillar/cmd/domainmgr/ @OhmSpectator
/pkg/pillar/cmd/volumemgr/ @OhmSpectator
/pkg/pillar/cmd/zedagent/ @OhmSpectator
/pkg/pillar/cmd/zedmanager/ @OhmSpectator
/pkg/pillar/cpuallocator/ @OhmSpectator
/pkg/pillar/hypervisor/ @OhmSpectator
/pkg/pillar/volumehandlers/ @OhmSpectator
/pkg/xen-tools/ @OhmSpectator
/pkg/xen/ @OhmSpectator


/pkg/pillar/cmd/domainmgr/ @uncleDecart
/pkg/pillar/cmd/zedagent/ @uncleDecart
/pkg/pillar/sriov/ @uncleDecart
/tests/eden/ @uncleDecart


/pkg/kube/ @zedi-pramodh
/pkg/mkimage-raw-efi/ @zedi-pramodh
/pkg/pillar/zfs/ @zedi-pramodh


/pkg/bsp-imx/ @rene
/pkg/cross-compilers/ @rene
/pkg/debug/lshw/ @rene
/pkg/fw/ @rene
/pkg/grub/ @rene
/pkg/kernel/ @rene
/pkg/new-kernel/ @rene
/pkg/optee-os/ @rene
/pkg/pillar/cmd/ledmanager/ @rene
/pkg/pillar/hypervisor/ @rene
/pkg/u-boot/ @rene
/pkg/xen-tools/ @rene
/pkg/xen/ @rene


/libs/zedUpload/ @rouming
/pkg/debug/ @rouming
/pkg/dom0-ztools/ @rouming
/pkg/kdump/ @rouming
/pkg/kernel/ @rouming
/pkg/kexec/ @rouming
/pkg/new-kernel/ @rouming
/pkg/pillar/cmd/downloader/ @rouming
/pkg/pillar/cmd/volumemgr/ @rouming
/pkg/pillar/cmd/zedagent/ @rouming
/pkg/pillar/cmd/zedmanager/ @rouming
/pkg/pillar/cmd/zedrouter/ @rouming
/pkg/pillar/containerd/ @rouming
/pkg/pillar/hypervisor/ @rouming
/pkg/pillar/zedcloud/ @rouming
/pkg/storage-init/ @rouming


/pkg/apparmor/ @shjala
/pkg/dom0-tools/ @shjala
/pkg/kernel/ @shjala
/pkg/new-kernel/ @shjala
/pkg/pillar/cmd/tpmmgr/ @shjala
/pkg/pillar/evetpm/ @shjala
/pkg/pillar/hypervisor/ @shjala
/pkg/vtpm/ @shjala
/pkg/xen-tools/ @shjala
/pkg/xen/ @shjala
* @eriknordmark
/api/ @deitch
/build-tools/ @deitch
/libs/depgraph/ @milan-zededa
/libs/nettrace/ @milan-zededa
/libs/reconciler/ @milan-zededa
/libs/zedUpload/ @christoph-zededa @deitch @rouming
/pkg/alpine/ @christoph-zededa
/pkg/apparmor/ @shjala
/pkg/bsp-imx/ @rene
/pkg/cross-compilers/ @rene
/pkg/debug/ @rouming
/pkg/debug/lshw/ @rene
/pkg/dom0-tools/ @shjala
/pkg/dom0-ztools/ @christoph-zededa @rouming
/pkg/edgeview/ @christoph-zededa @naiming-zededa
/pkg/fw/ @rene
/pkg/grub/ @mikem-zed @rene
/pkg/kdump/ @rouming
/pkg/kernel/ @mikem-zed @rene @rouming @shjala
/pkg/kexec/ @rouming
/pkg/kube/ @zedi-pramodh
/pkg/measure-config/ @mikem-zed
/pkg/mkimage-raw-efi/ @jsfakian @zedi-pramodh
/pkg/mkverification-raw-efi/ @jsfakian
/pkg/new-kernel/ @mikem-zed @rene @rouming @shjala
/pkg/newlog/ @deitch @naiming-zededa
/pkg/optee-os/ @rene
/pkg/pillar/cas/ @deitch
/pkg/pillar/cmd/baseosmgr/ @deitch
/pkg/pillar/cmd/domainmgr/ @OhmSpectator @jsfakian @milan-zededa @uncleDecart
/pkg/pillar/cmd/downloader/ @deitch @milan-zededa @rouming
/pkg/pillar/cmd/ledmanager/ @mikem-zed @rene
/pkg/pillar/cmd/nim/ @milan-zededa
/pkg/pillar/cmd/tpmmgr/ @mikem-zed @shjala
/pkg/pillar/cmd/volumemgr/ @OhmSpectator @deitch @rouming
/pkg/pillar/cmd/zedagent/ @OhmSpectator @milan-zededa @rouming @uncleDecart
/pkg/pillar/cmd/zedmanager/ @OhmSpectator @rouming
/pkg/pillar/cmd/zedrouter/ @christoph-zededa @milan-zededa @rouming
/pkg/pillar/containerd/ @deitch @rouming
/pkg/pillar/cpuallocator/ @OhmSpectator
/pkg/pillar/devicenetwork/ @milan-zededa
/pkg/pillar/dpcmanager/ @milan-zededa
/pkg/pillar/dpcreconciler/ @milan-zededa
/pkg/pillar/evetpm/ @mikem-zed @shjala
/pkg/pillar/hypervisor/ @OhmSpectator @mikem-zed @rene @rouming @shjala
/pkg/pillar/iptables/ @milan-zededa
/pkg/pillar/netdump/ @milan-zededa
/pkg/pillar/netmonitor/ @milan-zededa
/pkg/pillar/nireconciler/ @milan-zededa
/pkg/pillar/nistate/ @milan-zededa
/pkg/pillar/sriov/ @uncleDecart
/pkg/pillar/uplinkprober/ @milan-zededa
/pkg/pillar/utils/ @milan-zededa
/pkg/pillar/volumehandlers/ @OhmSpectator
/pkg/pillar/zedcloud/ @christoph-zededa @rouming
/pkg/pillar/zfs/ @zedi-pramodh
/pkg/rngd/ @deitch
/pkg/storage-init/ @rouming
/pkg/u-boot/ @rene
/pkg/uefi/ @mikem-zed
/pkg/verification/ @jsfakian
/pkg/vtpm/ @shjala
/pkg/wwan/ @milan-zededa
/pkg/xen-tools/ @OhmSpectator @mikem-zed @rene @shjala
/pkg/xen/ @OhmSpectator @mikem-zed @rene @shjala
/tests/eden/ @milan-zededa @uncleDecart
/tools/ @deitch @jsfakian
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -731,12 +731,12 @@ publish_sources: $(COLLECTED_SOURCES)

$(LIVE).raw: $(BOOT_PART) $(EFI_PART) $(ROOTFS_IMG) $(CONFIG_IMG) $(PERSIST_IMG) $(BSP_IMX_PART) | $(INSTALLER)
./tools/prepare-platform.sh "$(PLATFORM)" "$(BUILD_DIR)" "$(INSTALLER)" || :
./tools/makeflash.sh -C 559 $| $@ $(PART_SPEC)
./tools/makeflash.sh "mkimage-raw-efi" -C 559 $| $@ $(PART_SPEC)
$(QUIET): $@: Succeeded

$(INSTALLER).raw: $(BOOT_PART) $(EFI_PART) $(ROOTFS_IMG) $(INITRD_IMG) $(INSTALLER_IMG) $(CONFIG_IMG) $(PERSIST_IMG) $(BSP_IMX_PART) | $(INSTALLER)
./tools/prepare-platform.sh "$(PLATFORM)" "$(BUILD_DIR)" "$(INSTALLER)" || :
./tools/makeflash.sh -C 592 $| $@ "conf_win installer inventory_win"
./tools/makeflash.sh "mkimage-raw-efi" -C 592 $| $@ "conf_win installer inventory_win"
$(QUIET): $@: Succeeded

$(INSTALLER).iso: $(EFI_PART) $(ROOTFS_IMG) $(INITRD_IMG) $(INSTALLER_IMG) $(CONFIG_IMG) $(PERSIST_IMG) | $(INSTALLER)
Expand All @@ -760,7 +760,7 @@ $(LIVE).parallels: $(LIVE).raw
$(VERIFICATION).raw: $(BOOT_PART) $(EFI_PART) $(ROOTFS_IMG) $(INITRD_IMG) $(VERIFICATION_IMG) $(CONFIG_IMG) $(PERSIST_IMG) $(BSP_IMX_PART) | $(VERIFICATION)
@cp -r $(INSTALLER)/* $(VERIFICATION)
./tools/prepare-platform.sh "$(PLATFORM)" "$(BUILD_DIR)" "$(VERIFICATION)" || :
./tools/makeverification.sh -C 850 $| $@ "conf_win verification inventory_win"
./tools/makeflash.sh "mkverification-raw-efi" -C 850 $| $@ "conf_win verification inventory_win"
$(QUIET): $@: Succeeded

$(VERIFICATION).net: $(EFI_PART) $(ROOTFS_IMG) $(INITRD_IMG) $(VERIFICATION_IMG) $(CONFIG_IMG) $(PERSIST_IMG) $(KERNEL_IMG) | $(VERIFICATION)
Expand Down Expand Up @@ -806,6 +806,7 @@ verification: $(VERIFICATION) $(VERIFICATION_ARTIFACTS) current | $(BUILD_DIR)
$(QUIET)if [ -n "$(EVE_REL)" ] && [ $(HV) = $(HV_DEFAULT) ]; then \
$(LINUXKIT) $(DASH_V) pkg $(LINUXKIT_PKG_TARGET) --platforms linux/$(ZARCH) --hash-path $(CURDIR) --hash $(EVE_REL)-$(HV) --docker --release $(EVE_REL) $(FORCE_BUILD) $| ;\
fi
cp -r $|/installer/* $|/verification
$(QUIET): $@: Succeeded

.PHONY: image-set outfile-set cache-export cache-export-docker-load cache-export-docker-load-all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
# end of Scheduler Debugging

# CONFIG_DEBUG_TIMEKEEPING is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_PREEMPT is not set

#
# Lock Debugging (spinlocks, mutexes, etc...)
Expand Down
2 changes: 2 additions & 0 deletions pkg/pillar/base/logobjecttypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ const (
EncryptedVaultKeyFromDeviceLogType LogObjectType = "encrypted_vault_key_from_device"
// EncryptedVaultKeyFromControllerLogType:
EncryptedVaultKeyFromControllerLogType LogObjectType = "encrypted_vault_key_from_controller"
// CachedResolvedIPsLogType:
CachedResolvedIPsLogType LogObjectType = "cached_resolved_ips"
)

// RelationObjectType :
Expand Down
42 changes: 35 additions & 7 deletions pkg/pillar/cmd/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ type clientContext struct {
usableAddressCount int
networkState types.DPCState
subGlobalConfig pubsub.Subscription
subCachedResolvedIPs pubsub.Subscription
globalConfig *types.ConfigItemValueMap
zedcloudCtx *zedcloud.ZedCloudContext
getCertsTimer *time.Timer
Expand Down Expand Up @@ -97,6 +98,16 @@ func (ctxPtr *clientContext) ProcessAgentSpecificCLIFlags(flagSet *flag.FlagSet)
}
}

func (ctxPtr *clientContext) getCachedResolvedIPs(hostname string) []types.CachedIP {
if ctxPtr.subCachedResolvedIPs == nil {
return nil
}
if item, err := ctxPtr.subCachedResolvedIPs.Get(hostname); err == nil {
return item.(types.CachedResolvedIPs).CachedIPs
}
return nil
}

var (
serverNameAndPort string
onboardTLSConfig *tls.Config
Expand Down Expand Up @@ -179,6 +190,19 @@ func Run(ps *pubsub.PubSub, loggerArg *logrus.Logger, logArg *base.LogObject, ar
clientCtx.subGlobalConfig = subGlobalConfig
subGlobalConfig.Activate()

subCachedResolvedIPs, err := ps.NewSubscription(pubsub.SubscriptionOptions{
AgentName: "nim",
MyAgentName: agentName,
WarningTime: warningTime,
ErrorTime: errorTime,
TopicImpl: types.CachedResolvedIPs{},
Activate: true,
})
if err != nil {
log.Fatal(err)
}
clientCtx.subCachedResolvedIPs = subCachedResolvedIPs

subDeviceNetworkStatus, err := ps.NewSubscription(pubsub.SubscriptionOptions{
CreateHandler: handleDNSCreate,
ModifyHandler: handleDNSModify,
Expand All @@ -196,13 +220,14 @@ func Run(ps *pubsub.PubSub, loggerArg *logrus.Logger, logArg *base.LogObject, ar
clientCtx.subDeviceNetworkStatus = subDeviceNetworkStatus
subDeviceNetworkStatus.Activate()
zedcloudCtx := zedcloud.NewContext(log, zedcloud.ContextOptions{
DevNetworkStatus: clientCtx.deviceNetworkStatus,
SendTimeout: clientCtx.globalConfig.GlobalValueInt(types.NetworkSendTimeout),
DialTimeout: clientCtx.globalConfig.GlobalValueInt(types.NetworkDialTimeout),
AgentMetrics: clientCtx.zedcloudMetrics,
Serial: hardware.GetProductSerial(log),
SoftSerial: hardware.GetSoftSerial(log),
AgentName: agentName,
DevNetworkStatus: clientCtx.deviceNetworkStatus,
SendTimeout: clientCtx.globalConfig.GlobalValueInt(types.NetworkSendTimeout),
DialTimeout: clientCtx.globalConfig.GlobalValueInt(types.NetworkDialTimeout),
ResolverCacheFunc: clientCtx.getCachedResolvedIPs,
AgentMetrics: clientCtx.zedcloudMetrics,
Serial: hardware.GetProductSerial(log),
SoftSerial: hardware.GetSoftSerial(log),
AgentName: agentName,
})

clientCtx.zedcloudCtx = &zedcloudCtx
Expand Down Expand Up @@ -355,6 +380,9 @@ func Run(ps *pubsub.PubSub, loggerArg *logrus.Logger, logArg *base.LogObject, ar
return ret
}

case change := <-subCachedResolvedIPs.MsgChan():
subCachedResolvedIPs.ProcessChange(change)

case <-ticker.C:
// Check in case /config/server changes while running
nserver, err := os.ReadFile(types.ServerFileName)
Expand Down
Loading

0 comments on commit 9227f72

Please sign in to comment.